mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-04 00:02:01 -04:00
Fix execution bug
This commit is contained in:
parent
e7ecb4263a
commit
cd744fa6b3
@ -5,8 +5,7 @@ import pytest
|
||||
@pytest.mark.parametrize('msg', ['', 'a', 'abc', '1234567890123456789012345678901678901567890'])
|
||||
def test_sha256(msg):
|
||||
output = helpers.run_subprocess(
|
||||
['test_hash', 'sha256'],
|
||||
working_dir = 'tests',
|
||||
['tests/test_hash', 'sha256'],
|
||||
input = msg.encode(),
|
||||
)
|
||||
assert(output.rstrip() == hashlib.sha256(msg.encode()).hexdigest())
|
||||
@ -14,8 +13,7 @@ def test_sha256(msg):
|
||||
@pytest.mark.parametrize('msg', ['', 'a', 'abc', '1234567890123456789012345678901678901567890'])
|
||||
def test_sha384(msg):
|
||||
output = helpers.run_subprocess(
|
||||
['test_hash', 'sha384'],
|
||||
working_dir = 'tests',
|
||||
['tests/test_hash', 'sha384'],
|
||||
input = msg.encode(),
|
||||
)
|
||||
assert(output.rstrip() == hashlib.sha384(msg.encode()).hexdigest())
|
||||
@ -23,8 +21,7 @@ def test_sha384(msg):
|
||||
@pytest.mark.parametrize('msg', ['', 'a', 'abc', '1234567890123456789012345678901678901567890'])
|
||||
def test_sha512(msg):
|
||||
output = helpers.run_subprocess(
|
||||
['test_hash', 'sha512'],
|
||||
working_dir = 'tests',
|
||||
['tests/test_hash', 'sha512'],
|
||||
input = msg.encode(),
|
||||
)
|
||||
assert(output.rstrip() == hashlib.sha512(msg.encode()).hexdigest())
|
||||
|
Loading…
x
Reference in New Issue
Block a user