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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local test failure to do with FORCE_COLOR #548

Merged
merged 2 commits into from Dec 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_main.py
Expand Up @@ -602,7 +602,7 @@ def test_main_noxfile_options_with_sessions_override(

@pytest.mark.parametrize(("isatty_value", "expected"), [(True, True), (False, False)])
def test_main_color_from_isatty(monkeypatch, isatty_value, expected):
monkeypatch.delenv("FORCE_COLOR")
monkeypatch.delenv("FORCE_COLOR", raising=False)
monkeypatch.setattr(sys, "argv", [sys.executable])
with mock.patch("nox.workflow.execute") as execute:
execute.return_value = 0
Expand All @@ -627,7 +627,7 @@ def test_main_color_from_isatty(monkeypatch, isatty_value, expected):
],
)
def test_main_color_options(monkeypatch, color_opt, expected):
monkeypatch.delenv("FORCE_COLOR")
monkeypatch.delenv("FORCE_COLOR", raising=False)
monkeypatch.setattr(sys, "argv", [sys.executable, color_opt])
with mock.patch("nox.workflow.execute") as execute:
execute.return_value = 0
Expand Down