File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,23 @@ def test_not_enabled():
115
115
raise AssertionError (f"An unexpected exception was raised: { ex } " )
116
116
117
117
118
+ def test_python_attributes ():
119
+ for alg_name in oqs .get_enabled_sig_mechanisms ():
120
+ sig = oqs .Signature (alg_name )
121
+ if sig .method_name .decode () != alg_name :
122
+ raise AssertionError ("Incorrect oqs.Signature.method_name" )
123
+ if sig .alg_version is None :
124
+ raise AssertionError ("Undefined oqs.Signature.alg_version" )
125
+ if not 1 <= sig .claimed_nist_level <= 5 :
126
+ raise AssertionError ("Invalid oqs.Signature.claimed_nist_level" )
127
+ if sig .length_public_key == 0 :
128
+ raise AssertionError ("Incorrect oqs.Signature.length_public_key" )
129
+ if sig .length_secret_key == 0 :
130
+ raise AssertionError ("Incorrect oqs.Signature.length_secret_key" )
131
+ if sig .length_signature == 0 :
132
+ raise AssertionError ("Incorrect oqs.Signature.length_signature" )
133
+
134
+
118
135
if __name__ == "__main__" :
119
136
try :
120
137
import nose2
You can’t perform that action at this time.
0 commit comments