<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif">On Thu, May 21, 2015 at 11:42 PM, holger krekel </span><span dir="ltr" style="font-family:arial,sans-serif">&lt;<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>&gt;</span><span style="font-family:arial,sans-serif"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Thu, May 21, 2015 at 21:41 +0000, holger krekel wrote:<br>
&gt; On Thu, May 21, 2015 at 23:23 +0200, Stephan Obermann wrote:<br>
&gt; &gt; On Thu, May 21, 2015 at 10:48 PM, Ronny Pfannschmidt &lt;<br>
&gt; &gt; <a href="mailto:opensource@ronnypfannschmidt.de">opensource@ronnypfannschmidt.de</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; tox 2.0 introduced env var isolation, you need to explicitly white-list<br>
&gt; &gt; &gt; or use a older version<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; ​Is there a way to disable this feature or white-list all environment<br>
&gt; &gt; variables without specifying them one by one (as described in the<br>
&gt; &gt; documentation<br>
&gt; &gt; <a href="https://testrun.org/tox/latest/example/basic.html#passing-down-environment-variables" target="_blank">https://testrun.org/tox/latest/example/basic.html#passing-down-environment-variables</a><br>
&gt; &gt; )?<br>
&gt;<br>
&gt; You can use wildcards so for example<br>
&gt;<br>
&gt;     passenv = *<br>
&gt;<br>
&gt; should work.  For tox-2.0.2 i plan to collect suggestions<br>
&gt; to see which env vars should be put into the default set.<br>
<br>
</span>moreover, we could think about recognizing a TOX_PASSENV variable<br>
and add the specified names into all passenv settings for the testenvs.<br>
Would that help in your case?<br></blockquote><div> </div><div><div class="gmail_default" style="font-family:verdana,sans-serif">​Yes, that would definitely help to keep maintenance effort for our existing packages low - so much appreciated. :-)</div><div class="gmail_default" style="font-family:verdana,sans-serif">Would this also work for generated test environments (<a href="https://testrun.org/tox/latest/config.html#generating-environments-conditional-settings)?">https://testrun.org/tox/latest/config.html#generating-environments-conditional-settings)?</a>​</div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">​Cheers,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">/stephan​</div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><font color="#888888">
holger<br>
</font></span><div class=""><div class="h5"><br>
&gt; best,<br>
&gt; holger<br>
&gt;<br>
&gt; &gt; On 05/21/2015 10:41 PM, Albert-Jan Roskam wrote:<br>
&gt; &gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I am using Tox to run my unittests. This morning I upgraded my system<br>
&gt; &gt; &gt; (dist-upgrade to Debian 8 64), and I also upgraded tox (version 2.0.1),<br>
&gt; &gt; &gt; nosetests<br>
&gt; &gt; &gt; &gt; (version 1.3.6) and virtualenv (version 12.1.1).<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Now a setlocale line in my code trows an error. This happens in tox<br>
&gt; &gt; &gt; (py27 and py33+) but not in nosetests. The (very simplified) code is given<br>
&gt; &gt; &gt; below. Any idea why this happens, and how to resolve this?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; import locale<br>
&gt; &gt; &gt; &gt; class Foo(object):<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;     def __init__(self):<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;         print(&quot;@@@@@&quot;)<br>
&gt; &gt; &gt; &gt;         print(locale.setlocale(locale.LC_ALL, &quot;&quot;))<br>
&gt; &gt; &gt; &gt;                print(&quot;@@@@@&quot;)<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; import unittest<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; class TestFoo(unittest.TestCase):<br>
&gt; &gt; &gt; &gt;     def test_foo(self):<br>
&gt; &gt; &gt; &gt;         self.assertTrue(True)<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; if __name__ == &quot;__main__&quot;:<br>
&gt; &gt; &gt; &gt;        unittest.main()<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; File<br>
&gt; &gt; &gt; &quot;/home/albertjan/nfs/Public/project/.tox/py27/lib/python2.7/locale.py&quot;,<br>
&gt; &gt; &gt; line 579, in setlocale<br>
&gt; &gt; &gt; &gt; return _setlocale(category, locale)<br>
&gt; &gt; &gt; &gt; Error: unsupported locale setting<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; -------------------- &gt;&gt; begin captured stdout &lt;&lt; ---------------------<br>
&gt; &gt; &gt; &gt; @@@@@<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --------------------- &gt;&gt; end captured stdout &lt;&lt; ----------------------<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Thanks!<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Regards,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Albert-Jan<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; All right, but apart from the sanitation, the medicine, education, wine,<br>
&gt; &gt; &gt; public order, irrigation, roads, a<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; fresh water system, and public health, what have the Romans ever done<br>
&gt; &gt; &gt; for us?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; testing-in-python mailing list<br>
&gt; &gt; &gt; &gt; <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
&gt; &gt; &gt; &gt; <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; testing-in-python mailing list<br>
&gt; &gt; &gt; <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
&gt; &gt; &gt; <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
&gt; &gt; &gt;<br>
&gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; testing-in-python mailing list<br>
&gt; &gt; <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
&gt; &gt; <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; about me:    <a href="http://holgerkrekel.net/about-me/" target="_blank">http://holgerkrekel.net/about-me/</a><br>
&gt; contracting: <a href="http://merlinux.eu" target="_blank">http://merlinux.eu</a><br>
<br>
--<br>
about me:    <a href="http://holgerkrekel.net/about-me/" target="_blank">http://holgerkrekel.net/about-me/</a><br>
contracting: <a href="http://merlinux.eu" target="_blank">http://merlinux.eu</a><br>
</div></div></blockquote></div><br></div></div>