1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-26 17:31:38 +00:00
pqcrypto/test/test_common.py
2019-04-10 16:37:02 +02:00

30 lines
577 B
Python

"""
Runs functional tests for common crypto functions (e.g., fips202, sha2, aes).
"""
import os
import re
import platform
import unittest
import pqclean
import helpers
@helpers.skip_windows()
def test_common():
for d in os.listdir('common'):
primitive = re.sub(r"\.c$", "", d)
binname = os.path.join('..', 'bin', 'test_'+primitive)
helpers.make(binname)
helpers.run_subprocess([binname])
if __name__ == '__main__':
try:
import nose2
nose2.main()
except ImportError:
import nose
nose.runmodule()