-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Unit test execution #1330
Comments
Interesting, I don't get the multiple failures I see in your first run, which look mostly related to the format returned by the Alerter message builder not matching what the test is expecting. I've seen that before I think, I'll look in to it some more. The three failures you get otherwise I can reproduce - they're caused by not having a Just |
I cannot reproduce it at the moment. I wouldn't worry too much.
I confirm that, if "html" exists, the tests pass. It would be really great if the directory is created by simplemonitor's tests when needed (actually, perhaps even using |
I've edited this comment... One more question, related to tests. Could you run the tests this way?:
For me, if I'm in simplemonitor v1.12.0:
Run just with pytest: all good: https://gist.github.com/cpina/1856ceb5af850c21badefea04d44f1ec If I run with "TZ=GMT+12 pytest" I get failures: https://gist.github.com/cpina/8800b9e62af9bf2aee2adf4985d0e75f This came because the default Debian pipeline use reprotest (https://pypi.org/project/reprotest/) to check if a package is reproducible (and the package build step runs tests). I was having issues running some tests. I've just seen that if I'm in the tag v1.12.0: all good (as seen above), if I'm in the HEAD of |
I definitely get failures when overriding the timezone, I'll take a look. Has a feeling of timezone formatting weirdness to it, possibly related to using freezegun for testing time-related things. Nothing silly about that temp dir thing - it really should be doing that, but this was the first project I ever tried writing tests for so was feeling my way through it and learning as I went. I'll look at that too, or you're welcome to if you want :) |
This might be related: spulec/freezegun#526 Regarding the html directory:
Thanks!
I'll let you know if I start. I am pretty busy, I'm trying to prioritise the battles :-) at the moment the Debian package system runs the tests with "-k not test_html" which is not blocking the packaging... |
I've just tested the timezone issue again using. I have: 45fc32f , which includes https://github.com/jamesoff/simplemonitor/pull/1351/files and I see (execution with TZ=BST and TZ=UTC):
|
Thanks for re-testing. I'll have another go at trying to get my head round these :) |
In the git checkout
679353b0a0656bdbeed8293bb1a342f76f77417f
, if I run the unit tests withpytest
I get 23 failures (https://gist.github.com/cpina/e1daef2c0687f0a01baaa8d950f44eb4)If I do checkout the version v1.12.0 I get 3 failures (https://gist.github.com/cpina/1d1fa39cd6a9784fce2791ea0dea1cd2).
Two questions:
The text was updated successfully, but these errors were encountered: