Ensure tests do not break without schemes
This commit is contained in:
parent
e7602479f1
commit
493d77d89b
@ -40,14 +40,15 @@ class Scheme:
|
|||||||
def all_schemes_of_type(type: str) -> list:
|
def all_schemes_of_type(type: str) -> list:
|
||||||
schemes = []
|
schemes = []
|
||||||
p = os.path.join('..', 'crypto_' + type)
|
p = os.path.join('..', 'crypto_' + type)
|
||||||
for d in os.listdir(p):
|
if os.path.isdir(p):
|
||||||
if os.path.isdir(os.path.join(p, d)):
|
for d in os.listdir(p):
|
||||||
if type == 'kem':
|
if os.path.isdir(os.path.join(p, d)):
|
||||||
schemes.append(KEM(d))
|
if type == 'kem':
|
||||||
elif type == 'sign':
|
schemes.append(KEM(d))
|
||||||
schemes.append(Signature(d))
|
elif type == 'sign':
|
||||||
else:
|
schemes.append(Signature(d))
|
||||||
assert('Unknown type')
|
else:
|
||||||
|
assert('Unknown type')
|
||||||
return schemes
|
return schemes
|
||||||
|
|
||||||
def metadata(self):
|
def metadata(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user