Skip to content

Commit

Permalink
Fix: Custom pytest marker registration
Browse files Browse the repository at this point in the history
- Needed to happen on every run, not just main
  • Loading branch information
joshuatz committed Sep 25, 2024
1 parent 3dd5199 commit 4f04654
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions django_utils_lib/testing/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,8 @@ def pytest_addoption(parser: pytest.Parser):

@pytest.hookimpl()
def pytest_configure(config: pytest.Config):
if not is_main_pytest_runner(config):
return

# Register markers
# Note: This should be done every time (don't wrap in `is_main_pytest_runner` check)
config.addinivalue_line("markers", "requirements(requirements: List[str]): Attach requirements to test")


Expand Down

0 comments on commit 4f04654

Please sign in to comment.