What changed, and why it matters
This commit fixes a minor test-only bug. The test file was calling a unittest method (self.skipTest) inside a pytest-based test, which does not work correctly. The change replaces it with pytest.skip and adjusts imports. It only affects how one test is skipped when there is no Git directory; it does not change any production code or security behavior.
No security action needed. This is a routine test-maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In tests/test_version.py, the test class inherits from BaseTest (pytest-style) and previously used self.skipTest(…) from unittest to skip a test when no .git directory exists. The commit imports pytest and replaces the call with pytest.skip(…). This is a test-framework compatibility fix with no changes to application logic, cryptography, or device handling.
Changed components
tests/test_version.pyInspect captured patch +4 / −3
diff --git a/tests/test_version.py b/tests/test_version.py
index 4d450d6..cc99ef3 100644
--- a/tests/test_version.py
+++ b/tests/test_version.py
@@ -1,5 +1,6 @@
-from datetime import datetime
import os
+import pytest
+from datetime import datetime
from unittest import mock
# Must import this before any SeedSigner imports
@@ -35,8 +36,8 @@ class TestVersion(BaseTest):
if os.path.exists(git_dot_dir):
assert Version.get_version() != f"v{fake_hardcoded_version}"
else:
- # if there's no .git dir, mark this test as skipped
- self.skipTest(f"No .git dir found at {git_dot_dir}, skipping test.")
+ # If there's no .git dir, mark this test as skipped
+ pytest.skip(f"No .git dir found at {git_dot_dir}, skipping test.")
def test_version_with_mocked_git_head(self):
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.