-
Notifications
You must be signed in to change notification settings - Fork 37
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
Syrupy crashes when used with pytest-flake8 #246
Comments
Thanks for opening this issue. I'll take a look today |
Looking into pytest-flake8, it seems like an interesting use of pytest. In the pytest source, they don't assume node's always have an obj: https://github.com/pytest-dev/pytest/blob/2f406bb9cb8538e5a43551d6eeffe2be80bccefa/src/_pytest/nodes.py#L412. Either way, I put up a PR with a fix. Just investigating how we could test for this. |
🎉 This issue has been resolved in version 0.4.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Bug description
With the following dependencies in my poetry file:
I have this test file:
test_snapshot.py
And when I run it I get:
To Reproduce
Steps to reproduce the behavior:
py.test --flake8 path/to/your/test.py
Expected behaviour
The test should not fail in tear down and py.test should exit with 0 exit code.
Screenshots
N/A
Environment
Extra info
FWIW I "fixed" this for my install by using the following monkey-patch:
But I think it's really a problem with syrupy for assuming the
obj
attribute will be on the pytestItem
.The text was updated successfully, but these errors were encountered: