Bug#848249: diffoscope: set_locale needs to call tzset

2016-12-15 Thread Chris Lamb
Hi Brett, > So the whole thing with the set_locale test fixture is a little subtle. The > best reference I found for this is > . Very nice research, thank you. :) > If you want to make sure it runs before

Bug#848249: diffoscope: set_locale needs to call tzset

2016-12-15 Thread Brett Smith
So the whole thing with the set_locale test fixture is a little subtle. The best reference I found for this is . Before I touched this, the autouse=True argument meant it applied to all other fixtures in the

Bug#848249: diffoscope: set_locale needs to call tzset

2016-12-15 Thread Chris Lamb
tags 848249 + pending thanks Chris Lamb wrote: > Whilst you could "just" add this, I was wondering if you could ensure that > pytest *always* calls this so other tests are not affected. I believe there > is some magic fixture name/decorator in pytest for this. So, there is indeed some magic and

Bug#848249: diffoscope: set_locale needs to call tzset

2016-12-15 Thread Chris Lamb
Hi Brett, > Tags: patch Thanks for the patch! However, you do not actually call set_locale in the gzip test, you merely import it. Whilst you could "just" add this, I was wondering if you could ensure that pytest *always* calls this so other tests are not affected. I believe there is some magic

Bug#848249: diffoscope: set_locale needs to call tzset

2016-12-15 Thread Brett Smith
Source: diffoscope Severity: minor Tags: patch diffoscope sets the timezone to UTC to ensure that timezones are consistent from diff output tools. However, it does not call tzset after it does this. Because of this, C code running in the same process may continue to see and use the user's