Skip to content

Commit 7ce681b

Browse files
committed
fix tests.
1 parent 0f74c06 commit 7ce681b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/tests_full.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ jobs:
6565
run: poetry install
6666

6767
- name: Run executable test
68-
if: matrix.python-version != '3.13' # we will migrate pyinstaller to 3.13 later
68+
# we care about the one Python version that will be used to build the executable
69+
# TODO(MarshalX): upgrade to Python 3.13
70+
if: matrix.python-version == '3.12'
6971
run: |
7072
poetry run pyinstaller pyinstaller.spec
7173
./dist/cycode-cli version

tests/cli/commands/version/test_version_checker.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,12 @@ def test_check_for_update_scenarios(
9696
latest_version: str,
9797
expected_result: Optional[str],
9898
) -> None:
99-
with patch.object(version_checker_cached, '_should_check_update', return_value=True), patch.object(
100-
version_checker_cached, 'get_latest_version', return_value=latest_version
101-
), patch.object(version_checker_cached, '_update_last_check'):
99+
with patch.multiple(
100+
version_checker_cached,
101+
_should_check_update=MagicMock(return_value=True),
102+
get_latest_version=MagicMock(return_value=latest_version),
103+
_update_last_check=MagicMock()
104+
):
102105
result = version_checker_cached.check_for_update(current_version)
103106
assert result == expected_result
104107

0 commit comments

Comments
 (0)