Skip to content
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

Error of failing test is not verbose #6

Open
hathschi opened this issue Mar 31, 2021 · 1 comment
Open

Error of failing test is not verbose #6

hathschi opened this issue Mar 31, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@hathschi
Copy link

When running tests with scrapy run python -m unittest
after adding a dictionary item to be returned from the parse,
we get the following error message:

----------------------------------------------------------------------
Traceback (most recent call last):
  File "/app/testmaster/tests/github_language_tags/all_languages/parse/test_fixtures.py", line 22, in test__github_language_tags__all_languages__parse
    test(self)
  File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.8/site-packages/scrapy_testmaster/utils.py", line 473, in test
    six.raise_from(
  File "<string>", line 3, in raise_from
AssertionError: Callback output #0 doesn't match recorded output:


----------------------------------------------------------------------

The error is expected, as - of course - the new item is not contained in the fixture.
The issue here is, we expected (empty) and the actual (new) items to be displayed after ... doesn't match recorded output: but get empty output instead.
If we did not know the source of the error by ourselves, the message would not have told how to find it.

@ThomasAitken
Copy link
Owner

The log that is usually generated showing the differences between the fixture and the test version is just the printing-out of the datadiff exception. I am not planning to change this behaviour. I'm not sure why it didn't work in this case...

@ThomasAitken ThomasAitken added the enhancement New feature or request label Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants