Skip to content

Commit

Permalink
Check helper method signature in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoghlan committed Oct 28, 2024
1 parent 4ac20b8 commit 4688b8f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_minimal_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,10 @@ def test_locking_and_publishing(self) -> None:
for env in self.build_env.all_environments():
# First environment build: lock with uv, install with pip
mock_compile = cast(Mock, env.index_config._get_uv_pip_compile_args)
mock_compile.assert_called_once()
mock_compile.assert_called_once_with()
mock_compile.reset_mock()
mock_install = cast(Mock, env.index_config._get_pip_install_args)
mock_install.assert_called_once()
mock_install.assert_called_once_with()
mock_install.reset_mock()
subtests_passed += 1
subtests_started += 1
Expand All @@ -619,10 +619,10 @@ def test_locking_and_publishing(self) -> None:
# The lock file is recreated, the timestamp metadata just doesn't
# get updated if the hash of the contents doesn't change
mock_compile = cast(Mock, env.index_config._get_uv_pip_compile_args)
mock_compile.assert_called_once()
mock_compile.assert_called_once_with()
mock_compile.reset_mock()
mock_install = cast(Mock, env.index_config._get_pip_install_args)
mock_install.assert_not_called()
mock_install.assert_not_called_with()
subtests_passed += 1
# Test stage: ensure lock timestamps *do* change when the requirements "change"
for env in build_env.all_environments():
Expand All @@ -644,10 +644,10 @@ def test_locking_and_publishing(self) -> None:
for env in self.build_env.all_environments():
# Locked, but not rebuilt, so only uv should be called
mock_compile = cast(Mock, env.index_config._get_uv_pip_compile_args)
mock_compile.assert_called_once()
mock_compile.assert_called_once_with()
mock_compile.reset_mock()
mock_install = cast(Mock, env.index_config._get_pip_install_args)
mock_install.assert_not_called()
mock_install.assert_not_called_with()
subtests_passed += 1
# Test stage: ensure exported environments allow launch module execution
subtests_started += 1
Expand Down

0 comments on commit 4688b8f

Please sign in to comment.