Skip to content

--fixtures only shows fixtures from first file #833

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

Closed
The-Compiler opened this issue Jul 12, 2015 · 0 comments
Closed

--fixtures only shows fixtures from first file #833

The-Compiler opened this issue Jul 12, 2015 · 0 comments
Labels
type: bug problem that needs to be addressed

Comments

@The-Compiler
Copy link
Member

If I have two files:

test_a.py:

import pytest

@pytest.fixture
def fix_a():
    """Fixture A"""
    pass

def test_a(fix_a):
    pass

and test_b.py:

import pytest

@pytest.fixture
def fix_b():
    """Fixture B"""
    pass

def test_b(fix_b):
    pass

Running pytest --fixtures will only show fix_a:

====================== test session starts ======================
platform linux -- Python 3.4.3 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/florian/tmp/fixture_test, inifile: 
plugins: mock
collected 2 items 
[...]

----------------- fixtures defined from test_a ------------------
fix_a
    Fixture A

=======================  in 0.01 seconds ========================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

2 participants