-
Notifications
You must be signed in to change notification settings - Fork 171
Testing framework
gbelvin edited this page Jun 24, 2011
·
2 revisions
Each scheme in the ./schemes/ directory shall have
a method that executes a basic test of the scheme named main that shall use assert to verify the correct functioning of the scheme like so
def main():
#Run scheme
m = 'message'
c = scheme.encrypt(m)
d = scheme.decrypt(c)
assert m == d, "Decryption Failed"
print("Scheme Works!")
if __name__ == "__main__":
main()
`
-
all_unittests.pysearches for unit test classes and executes all tests that it finds -
all_schemes.pyexecutes themaintest case for each scheme and displays the results -
make testruns all tests on the framework, currently the two preceding tasks.