-
Notifications
You must be signed in to change notification settings - Fork 0
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
Python test improvements #388
Conversation
tests/utils/eval_against_sql.py
Outdated
if "PYTEST_CURRENT_TEST" in os.environ or not expect_failure: | ||
assert ( | ||
not data_difference.failed | ||
), f"Comparison failed on shot {data_difference.shot_id}, column { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your last commits introduces this newline, but it breaks stuff for me with:
Traceback (most recent call last):
File "disruption-py/tests/test_against_cache.py", line 18, in <module>
from tests.utils.eval_against_sql import (
File "disruption-py/tests/utils/eval_against_sql.py", line 188
), f"Comparison failed on shot {data_difference.shot_id}, column {
^
SyntaxError: unterminated string literal (detected at line 188)
did the newline solve stuff for you? which python version are you using?
2c67b89
to
cdb0dfc
Compare
for C-MOD, I have on a separate note, now that you added a quick shortcut to switch the log-level from the cli, I'll put INFO back as default. |
I took a look and this happens because we expect failure by column rather than shot and column. For a given column, some shots pass the test and some shots fail. If we succeeded for all shots, pytest would mark as xsuccess, but as soon as one shot fails it marks xfail. |
Addresses
Changes
AssertionError: Comparison failed on shot 1150805012, column sxr