New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests are dependent on environment's locale #2712
Comments
For the three failed test where class names differ - it is a result of a change in the upstream pygments module re: how it parses python. I think this is another indication that the tests need to be fixed to be less brittle. |
You don't have Well, we kind of assume you have a valid locale. locale.setlocale(locale.LC_ALL, '') at which point, |
Fair, enough. I am closing this one and will open an issue for things related to the updated |
|
@galaxy4public: I am sorry to hear that this problem caused you some time, and undoubtedly some frustration as well. I hope you will take some small comfort from knowing that you tracked down a problem that also affected my local workstation, but I hadn't had time to figure out the source of the test result discrepancy. So I very much appreciate you taking the time to identify this issue. 🙇 And thanks to @avaris for helpfully linking back to where I pinned this previously. I just submitted a PR that updates and pins to the current Pygments 2.6.1 version and also moves said pinning to a requirements file for (hopefully) more consistent testing behavior across environments. Comments on that PR are welcome. |
On a clean clone of the repository one could affect the outcome of integrated tests by changing their system locale environment, e.g.:
Unfortunately, on my system, there is some other environmental issue that slightly fails these three tests (the content is generated correctly, but class names differ in a minor way, e.g.
class="testingbp"
becomesclass="testingkc"
, I am still trying to figure this out)Now, if we provide an invalid
LANG
value, suddenly, French tests will start to fail:They also fail with a valid locale such as
ru_RU
(Russian):Although, I think it should not really matter for a self-contained test suite, but I have ensured that all locales are installed on my system (despite that I have no use for the French locale):
I need some help here since I am just starting to learn how Pelican's test suite is designed. Thanks!
The text was updated successfully, but these errors were encountered: