[openstack-dev] [all] PYTHONDONTWRITEBYTECODE=true in tox.ini
Sean Dague
sean at dague.net
Fri Sep 12 15:24:00 UTC 2014
On 09/12/2014 11:21 AM, Mike Bayer wrote:
>
> On Sep 12, 2014, at 7:39 AM, Sean Dague <sean at dague.net> wrote:
>
>> I assume you, gentle OpenStack developers, often find yourself in a hair
>> tearing out moment of frustration about why local unit tests are doing
>> completely insane things. The code that it is stack tracing on is no
>> where to be found, and yet it fails.
>>
>> And then you realize.... that part of oslo doesn't exist any more....
>> except there are still pyc files laying around. Gah!
>>
>> I've proposed the following to Nova and Python novaclient -
>> https://review.openstack.org/#/c/121044/
>>
>> Which sets PYTHONDONTWRITEBYTECODE=true in the unit tests.
>
> my VPN was down and I didn’t get this thread just now, but I am strongly -1 on this as added to tox.ini, my response is http://lists.openstack.org/pipermail/openstack-dev/2014-September/045873.html.
>
> Short answer: if you want this feature, put PYTHONDONTWRITEBYTECODE into *your* environment. Don’t force it on our automated tests or on my environment. .pyc files make a difference in behavior, and if we banish them from all testing, then our code is never tested within the environment that it will normally be run in after shipment.
>
> I’d far prefer a simple script added to tox.ini which deletes orphaned .pyc files only, if a change to tox.ini must be made.
Your example in the other thread includes the random seed behavior,
which is already addressed in new tox. So I don't see that as an issue.
-Sean
--
Sean Dague
http://dague.net
More information about the OpenStack-dev
mailing list