-
-
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
session scope fixtures can't run tests which does not start with test* or setup* #948
Comments
Any update or comments on the above. ? |
Hi, sorry for taking so long to respond! 😅 Hmmm I can't reproduce your problem. I copied your examples verbatim, and this is the output I get against different pytest versions: pytest-2.7.0
pytest-2.7.2
pytest-2.8.0.dev4
Of course I tried it on Windows, but this is kind of issue is hardly platform specific... |
Just tried it on a Ubuntu box too, same results for pytest-2.7.0 and pytest-2.7.2. |
@mrniranjan could you perhaps try your example in a clean |
@mrniranjan any news? |
I apologise for the delay, I tested again in both rhel7.2(beta) and Fedora-21 to see if i can reproduce again,(without virtualenv, as my original reported issue was without virtualenv)
On Fedora 21. (pytest-2.6.4-1.fc21.noarch)
In both the cases below is the test1.py and conftest.py
As you can see, I don't see the issue again, I am still not sure, why the issue was seen only in one system. This issue can be closed now, |
I am following the link: https://pytest.org/latest/example/special.html to understand how session scoped fixtures work if we have to call a particular test function like 'callme' as specified in the example
But the example doesn't work with pytest version 2.7, (works as expected with pytest 2.3).
Below is the conftest.py
Below is the test_module.py
Output when run:
As you can see in the above output, callme function is called only if unittest.testcase module is loaded otherwise this function is not called.
Where as with py.test 2.3 it works as expected.
Additional Details:
Version of python: python-2.7.5-16.el7.x86_64 (In both working and non working systems)
RHEL7.1 (x86_64)
The text was updated successfully, but these errors were encountered: