1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 15:39:07 +00:00

Ensure tests do not break without schemes

This commit is contained in:
Joost Rijneveld 2019-04-08 11:14:45 +02:00
parent e7602479f1
commit 493d77d89b
No known key found for this signature in database
GPG Key ID: A4FE39CF49CBC553

View File

@ -40,14 +40,15 @@ class Scheme:
def all_schemes_of_type(type: str) -> list:
schemes = []
p = os.path.join('..', 'crypto_' + type)
for d in os.listdir(p):
if os.path.isdir(os.path.join(p, d)):
if type == 'kem':
schemes.append(KEM(d))
elif type == 'sign':
schemes.append(Signature(d))
else:
assert('Unknown type')
if os.path.isdir(p):
for d in os.listdir(p):
if os.path.isdir(os.path.join(p, d)):
if type == 'kem':
schemes.append(KEM(d))
elif type == 'sign':
schemes.append(Signature(d))
else:
assert('Unknown type')
return schemes
def metadata(self):