소스 검색

Skip SSHSigSignatureVendor tests when sshsig is unavailable

Jelmer Vernooij 1 주 전
부모
커밋
b60259e6e0
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      tests/test_signature.py

+ 5 - 0
tests/test_signature.py

@@ -438,6 +438,11 @@ class GetSignatureVendorTests(unittest.TestCase):
 class SSHSigSignatureVendorTests(unittest.TestCase):
     """Tests for SSHSigSignatureVendor (sshsig package implementation)."""
 
+    def setUp(self) -> None:
+        """Check if sshsig package is available."""
+        if not SSHSigSignatureVendor.available():
+            self.skipTest("sshsig package not available")
+
     def test_verify_without_config_raises(self) -> None:
         """Test that verify without config or keyids raises UntrustedSignature."""
         from dulwich.signature import UntrustedSignature