You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run python -m pytest tests/test_utils.py -ktest_zipped_paths_extracted this test will pass normally. If you run it again, it will pass again.
If, however, you make any modifications to the file, the test will now fail and keep failing:
E AssertionError: assert False
E + where False = <function cmp at 0x7f4ea6d4dab0>('/tmp/test_utils.py', '/home/david/project-reducer/scratch/requests/tests/test_utils.py')
E + where <function cmp at 0x7f4ea6d4dab0> = filecmp.cmp
The reason for this is that the last time the test ran, the contents of __file__ were written to /tmp/test_utils.py and when extract_zipped_paths is next called, it doesn't overwrite the existing file, so the filecmp fails because it's now comparing against the old version of the file.
Expected Result
The test should run successfully when modifications to the file are made.
Actual Result
Modifications to the test file that are unrelated to the test in question cause it to fail.
If you run
python -m pytest tests/test_utils.py -ktest_zipped_paths_extracted
this test will pass normally. If you run it again, it will pass again.If, however, you make any modifications to the file, the test will now fail and keep failing:
The reason for this is that the last time the test ran, the contents of
__file__
were written to/tmp/test_utils.py
and whenextract_zipped_paths
is next called, it doesn't overwrite the existing file, so the filecmp fails because it's now comparing against the old version of the file.Expected Result
The test should run successfully when modifications to the file are made.
Actual Result
Modifications to the test file that are unrelated to the test in question cause it to fail.
Reproduction Steps
System Information
The text was updated successfully, but these errors were encountered: