-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Test becomes flaky by upgrading pytest from 7.4.4 to 8.1.0 -> fails normally but is successfull when run in verbose more #12071
Comments
Can you try downgrading to 7.4.4 again and double-check it indeed passes there? This looks entirely unrelated to pytest... |
This is working fine on 7.4.4. Link for where the test worked https://github.com/mkashwin/unifiednamespace/actions/runs/8137480142/job/22235919114#step:4:1 |
at first glance testpaths doesnt match the ini options from pyproject.toml - so something else is wrong as well |
nm, i missunderstood the nesting setup |
Issue also present in pytest 8.1.1 which was released last night |
Can you provide a https://stackoverflow.com/help/minimal-reproducible-example to help us debug this? Ideally a single file which reproduces the issue. |
@Zac-HD Apologies for not giving that earlier, I though giving the link to the github project with direct reference to test case and code being tested would have made life easier. Looks like 8.1.0 got yanked and now I am unable to reproduce this with 8.1.1. Thanks for your efforts |
a detailed description of the bug or problem you are having
In my github actions, I am seeing a strange behaviour of one of my unit tests failing when executed normally but when executed in debug mode or with -v ( verbose mode) the test passes. In the normal mode, it appears that my application cache / a object level dict attribute is being cleared, causing Key error later on. Details of the test case and the logs from the test runs on github runner are provided below. This was not the behaviour with pytest 7.4.4
output of
pip list
from the virtual environment you are usingThe poetry lock file with all dependencies is here
pytest and operating system versions
Ubuntu 22.04.4 LTS ( as provided in the github runner)
pytest version 8.1.0
minimal example if possible
The link to the unit test case which is failing is
test_spb2unspublisher
Run1 : done without debug mode and fails
KeyError: 'group1_/edge_node_1/MyDevice'
makes no sense as the key was explicitly set in the actual code codeApplication Code with the logic to set the cache key
Run3 : Done with debug mode and no further changes and passes
The text was updated successfully, but these errors were encountered: