浏览代码

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