Skip to content

Commit

Permalink
tests: add a couple of checks
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Mar 6, 2024
1 parent cd35053 commit 23e55d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def test_virtualenv_as_none(self):
with pytest.raises(ValueError, match="virtualenv"):
_ = session.virtualenv

assert session.venv_backend == "none"

def test_interactive(self):
session, runner = self.make_session_and_runner()

Expand Down
2 changes: 2 additions & 0 deletions tests/test_virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,11 @@ def test_stale_environment(make_one, frm, to, result, monkeypatch):
monkeypatch.setenv("NOX_ENABLE_STALENESS_CHECK", "1")
venv, _ = make_one(reuse_existing=True, venv_backend=frm)
venv.create()
assert venv.venv_backend == frm

venv, _ = make_one(reuse_existing=True, venv_backend=to)
reused = venv._check_reused_environment_type()
assert venv.venv_backend == to

assert reused == result

Expand Down

0 comments on commit 23e55d0

Please sign in to comment.