Skip to content

Commit ddce169

Browse files
committed
test: nit
1 parent 13e75aa commit ddce169

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

tests/conftest.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import re
5+
import subprocess
56
import sys
67
import tempfile
78
from pathlib import Path
@@ -145,11 +146,19 @@ def tmp_commitizen_project_with_gpg(tmp_commitizen_project):
145146

146147
try:
147148
# create a key (a keyring will be generated within GPUPGHOME)
148-
c = cmd.run(
149-
f"gpg --batch --yes --debug-quick-random --passphrase '' --quick-gen-key '{SIGNER} {SIGNER_MAIL}'"
149+
subprocess.run(
150+
[
151+
"gpg",
152+
"--batch",
153+
"--yes",
154+
"--debug-quick-random",
155+
"--passphrase",
156+
"",
157+
"--quick-gen-key",
158+
f"{SIGNER} {SIGNER_MAIL}",
159+
],
160+
check=True,
150161
)
151-
if c.return_code != 0:
152-
raise Exception(f"gpg keygen failed with err: '{c.err}'")
153162
key_id = _get_gpg_keyid(SIGNER_MAIL)
154163
assert key_id
155164

0 commit comments

Comments
 (0)