Daniel Garcia
2d13b6df7d
- Update to version 1.1.0: * SigstoreSigner: Re-enable compatibility with Sigstore (#781) - 1.0.0: Added * Signer: add public_key attribute to interface (#756) * VaultSigner: Signer implementation for HashiCorp Vault (#800) * CryptoSigner: support ecdsa keytype that is no longer in spec (#711) * CryptoSigner: add private_bytes property (#799) * CryptoSigner: add "file2" signer uri (#759) * test: use localstack to test AWSSigner (#777) Removed * CryptoSigner: remove "file" signer uri (#759) * migration script for legacy keys (#770) * SSlibSigner class and *_securesystemslib_key methods (#771) * legacy key key*, interface, util and schema modules (#772, #773, #776) * unused functions in hash, and formats module (#774, #776) * unused global key constants (#806) Changed * SSlibKey: strengthen input validation (#780, #795) * AWSSigner: support default scheme and add stronger input validation (#724, #778) * dsse: change Envelope.signatures type to dict (#743) * vendor: update ed25519 copy (#793) * docs: improve user and contributor docs (#744, #745, #746, #749, #759, #796) * test: improve and temporarily disable SigstoreSigner test (#779, #785) * ci: use dependabot groups, update weekly (#735) * ci: test macOS and Windows on latest Python only (#797) * Make securessystemslib.gpg internal (#792) Fixed * Fix check-upstream-ed25519 workflow permission (#706) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-securesystemslib?expand=0&rev=6
47 lines
1.9 KiB
Diff
47 lines
1.9 KiB
Diff
Description: Use python3 in tests
|
|
Some upstream tests for the custom `process` module call the python interpreter
|
|
in a subprocess. In Debian, where we only build for python3, "python" is not
|
|
available during build and thus makes those tests fail. This patch replaces
|
|
"python" with "python3" where applicable.
|
|
Author: Lukas Puehringer <lukas.puehringer@nyu.edu>
|
|
Forwarded: not-needed
|
|
|
|
--- python-securesystemslib-0.16.0.orig/tests/test_process.py
|
|
+++ python-securesystemslib-0.16.0/tests/test_process.py
|
|
@@ -38,7 +38,7 @@ class Test_Process(unittest.TestCase):
|
|
|
|
stdin_file = open(path)
|
|
cmd = \
|
|
- "python -c \"import sys; assert(sys.stdin.read() == '{}')\""
|
|
+ "python3 -c \"import sys; assert(sys.stdin.read() == '{}')\""
|
|
|
|
# input is used in favor of stdin
|
|
securesystemslib.process.run(cmd.format("use input kwarg"),
|
|
@@ -57,7 +57,7 @@ class Test_Process(unittest.TestCase):
|
|
def test_run_duplicate_streams(self):
|
|
"""Test output as streams and as returned. """
|
|
# Command that prints 'foo' to stdout and 'bar' to stderr.
|
|
- cmd = ("python -c \""
|
|
+ cmd = ("python3 -c \""
|
|
"import sys;"
|
|
"sys.stdout.write('foo');"
|
|
"sys.stderr.write('bar');\"")
|
|
@@ -101,7 +101,7 @@ class Test_Process(unittest.TestCase):
|
|
|
|
def test_run_cmd_arg_return_code(self):
|
|
"""Test command arg as string and list using return code. """
|
|
- cmd_str = ("python -c \""
|
|
+ cmd_str = ("python3 -c \""
|
|
"import sys;"
|
|
"sys.exit(100)\"")
|
|
cmd_list = shlex.split(cmd_str)
|
|
@@ -117,7 +117,7 @@ class Test_Process(unittest.TestCase):
|
|
def test_run_duplicate_streams_timeout(self):
|
|
"""Test raise TimeoutExpired. """
|
|
with self.assertRaises(securesystemslib.process.subprocess.TimeoutExpired):
|
|
- securesystemslib.process.run_duplicate_streams("python --version",
|
|
+ securesystemslib.process.run_duplicate_streams("python3 --version",
|
|
timeout=-1)
|
|
|
|
|