1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-26 17:31:38 +00:00

Improve skipping for duplicate_consistency test

This commit is contained in:
Douglas Stebila 2019-04-04 12:38:47 -04:00
parent 7a4e0d445b
commit ad4984fdad

View File

@ -5,7 +5,7 @@ Checks that files duplicated across schemes/implementations are consistent.
import os import os
import pqclean import pqclean
import helpers import helpers
import unittest
def test_duplicate_consistency(): def test_duplicate_consistency():
for scheme in pqclean.Scheme.all_schemes(): for scheme in pqclean.Scheme.all_schemes():
@ -18,8 +18,9 @@ def file_get_contents(filename):
return f.read() return f.read()
def check_duplicate_consistency(implementation): def check_duplicate_consistency(implementation):
helpers.ensure_available('sed') helpers.skip_windows()
if 'duplicate-consistency' in implementation.metadata(): if not('duplicate-consistency' in implementation.metadata()):
raise unittest.SkipTest('No duplicate consistency requirements defined')
dc = implementation.metadata()['duplicate-consistency'] dc = implementation.metadata()['duplicate-consistency']
for pairs in dc['files']: for pairs in dc['files']:
transformed_src = helpers.run_subprocess( transformed_src = helpers.run_subprocess(