-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
""" | ||
A test harness for gnupg.py. | ||
Copyright (C) 2008-2022 Vinay Sajip. All rights reserved. | ||
Copyright (C) 2008-2023 Vinay Sajip. All rights reserved. | ||
""" | ||
import argparse | ||
import json | ||
|
@@ -16,6 +16,11 @@ | |
import tempfile | ||
import unittest | ||
|
||
try: | ||
unicode | ||
except NameError: | ||
unicode = str | ||
|
||
try: | ||
from unittest import skipIf | ||
except ImportError: # pragma: no cover | ||
|
@@ -30,7 +35,7 @@ def skipIf(condition, message): | |
import gnupg | ||
|
||
__author__ = 'Vinay Sajip' | ||
__date__ = '$23-Aug-2022 16:37:02$' | ||
__date__ = '$22-Jul-2023 16:37:02$' | ||
|
||
ALL_TESTS = True | ||
|
||
|
@@ -726,7 +731,7 @@ def test_scan_keys(self): | |
fd, key_fn = tempfile.mkstemp(prefix='pygpg-test-') | ||
os.write(fd, KEYS_TO_IMPORT.encode('ascii')) | ||
os.close(fd) | ||
test_files = (key_fn,) | ||
test_files = (key_fn, ) | ||
try: | ||
for fn in test_files: | ||
logger.debug('scanning keys in %s', fn) | ||
|
@@ -746,7 +751,7 @@ def test_scan_keys_mem(self): | |
'Gary Gross (A test user) <[email protected]>', | ||
'Danny Davis (A test user) <[email protected]>', | ||
]) | ||
for key in (KEYS_TO_IMPORT,): | ||
for key in (KEYS_TO_IMPORT, ): | ||
logger.debug('testing scan_keys') | ||
data = self.gpg.scan_keys_mem(key) | ||
self.assertEqual(0, data.returncode, 'Non-zero return code') | ||
|
@@ -1560,8 +1565,9 @@ def test_multiple_signatures_one_invalid(self): | |
set([ | ||
'test_deletion', 'test_import_and_export', 'test_list_keys_after_generation', 'test_list_signatures', | ||
'test_key_generation_with_invalid_key_type', 'test_key_generation_with_escapes', 'test_key_generation_input', | ||
'test_key_generation_with_colons', 'test_search_keys', 'test_scan_keys', 'test_scan_keys_mem', 'test_key_trust', 'test_add_subkey', | ||
'test_add_subkey_with_invalid_key_type', 'test_deletion_subkey', 'test_list_subkey_after_generation' | ||
'test_key_generation_with_colons', 'test_search_keys', 'test_scan_keys', 'test_scan_keys_mem', | ||
'test_key_trust', 'test_add_subkey', 'test_add_subkey_with_invalid_key_type', 'test_deletion_subkey', | ||
'test_list_subkey_after_generation' | ||
]), | ||
'import': | ||
set(['test_import_only', 'test_doctest_import_keys']), | ||
|