Skip to content

Commit

Permalink
Check whether GPG is actually available rather than inferring from OS
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Nov 16, 2024
1 parent 84aa3cd commit 99ce001
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/compat/test_porcelain.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
"""Compatibility tests for dulwich.porcelain."""

import os
import platform
import sys
from unittest import skipIf

from dulwich import porcelain
Expand All @@ -31,15 +29,17 @@
from ..test_porcelain import PorcelainGpgTestCase
from .utils import CompatTestCase, run_git_or_fail

try:
import gpgme
except ImportError:
gpgme = None


@skipIf(
platform.python_implementation() == "PyPy" or sys.platform == "win32",
"gpgme not easily available or supported on Windows and PyPy",
gpgme is None,
"gpgme not available, skipping tests that require GPG signing",
)
class TagCreateSignTestCase(PorcelainGpgTestCase, CompatTestCase):
def setUp(self):
super().setUp()

def test_sign(self):
# Test that dulwich signatures can be verified by CGit
c1, c2, c3 = build_commit_graph(
Expand Down

0 comments on commit 99ce001

Please sign in to comment.