diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-03-03 03:26:43 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-03-03 03:26:43 (GMT) |
commit | 963c80fd45d8c94d15ea4085ce200365018a1556 (patch) | |
tree | fd1d174d1ef66efdc1477bbea44f137e95ec4c98 /Lib | |
parent | bfbf5b37153395d1100388f2398a80766bc4dba4 (diff) | |
download | cpython-963c80fd45d8c94d15ea4085ce200365018a1556.zip cpython-963c80fd45d8c94d15ea4085ce200365018a1556.tar.gz cpython-963c80fd45d8c94d15ea4085ce200365018a1556.tar.bz2 |
Add a note in the main test class' docstring that the order of execution of the
tests is important.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_pep247.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_pep247.py b/Lib/test/test_pep247.py index 6add210..0497ee9 100644 --- a/Lib/test/test_pep247.py +++ b/Lib/test/test_pep247.py @@ -10,6 +10,8 @@ warnings.filterwarnings("ignore", "the sha module is deprecated.*", DeprecationWarning) import md5, sha, hmac +from test.test_support import verbose + def check_hash_module(module, key=None): assert hasattr(module, 'digest_size'), "Must have digest_size" @@ -47,10 +49,15 @@ def check_hash_module(module, key=None): hd2 += "%02x" % ord(byte) assert hd2 == hexdigest, "hexdigest doesn't appear correct" - print 'Module', module.__name__, 'seems to comply with PEP 247' + if verbose: + print 'Module', module.__name__, 'seems to comply with PEP 247' -if __name__ == '__main__': +def test_main(): check_hash_module(md5) check_hash_module(sha) check_hash_module(hmac, key='abc') + + +if __name__ == '__main__': + test_main() |