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

Move pytest fixtures to conftest.py #1030

Closed
dorothykiz1 opened this issue Feb 15, 2022 · 2 comments · Fixed by #1159
Closed

Move pytest fixtures to conftest.py #1030

dorothykiz1 opened this issue Feb 15, 2022 · 2 comments · Fixed by #1159

Comments

@dorothykiz1
Copy link
Contributor

When fixtures are not defined in the standard conftest.py and are defined elsewhere in other files,
once imported for reference they are not recognized.

Flake8 example error : F401 '.tools.example_results' imported but unused

What is expected is to move all fixtures to the conftest.py file, this will not require the unnecessary imports for fixtures hence no errors of not found fixtures in the CI as shown below.

ie. fixture 'example_results' not found

@dorothykiz1
Copy link
Contributor Author

@LucyJimenez @datapythonista i will work on this

@dorothykiz1
Copy link
Contributor Author

Most of the fixtures have been moved to the conftest.py file and 3 files with 4 fixtures are pending,i have opened PRs for them i will be editing this comment once merged

(venv) dorothy@dorothy-Latitude-5480:~/Desktop/sprint/asv$ grep -R --exclude-dir="build" --exclude="*.css" "@pytest.fixture" *
test/test_dev.py:@pytest.fixture
test/test_dev.py:@pytest.fixture
test/test_step_detect.py:@pytest.fixture(params=[
test/test_publish.py:@pytest.fixture(params=[
test/conftest.py:@pytest.fixture(params=[
test/conftest.py:@pytest.fixture
test/conftest.py:@pytest.fixture
test/conftest.py:@pytest.fixture
test/conftest.py:@pytest.fixture(scope="session")
test/conftest.py:@pytest.fixture(scope="session")
test/conftest.py:@pytest.fixture
test/conftest.py:@pytest.fixture(scope="session")
test/conftest.py:@pytest.fixture
test/conftest.py:@pytest.fixture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants