Skip to content

Commit

Permalink
tests: reset nox.options between tests to avoid manifest being unexpe…
Browse files Browse the repository at this point in the history
…ctedly filtered
  • Loading branch information
theacodes committed Jul 12, 2023
1 parent b88ecad commit c1120f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ def reset_needs_version():
nox.needs_version = None


@pytest.fixture
def reset_global_nox_options():
nox.options = _options.options.noxfile_namespace()


def test_load_nox_module_needs_version_static(reset_needs_version, tmp_path):
text = dedent(
"""
Expand Down Expand Up @@ -315,7 +320,7 @@ def quux():
assert "Tag selection caused no sessions to be selected." in caplog.text


def test_merge_sessions_and_tags():
def test_merge_sessions_and_tags(reset_global_nox_options):
@nox.session(tags=["foobar"])
def test():
pass
Expand Down

0 comments on commit c1120f2

Please sign in to comment.