whirlpool.py: skip tests during import
authorZac Medico <zmedico@gentoo.org>
Tue, 4 Oct 2011 16:39:58 +0000 (09:39 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 4 Oct 2011 16:39:58 +0000 (09:39 -0700)
pym/portage/util/whirlpool.py

index 5f5c76b4b78a41b6c0466a2aeb66adebfe18d566..399958a1f6a331cb85afcb5699ec39c9111ca8b9 100644 (file)
@@ -784,9 +784,10 @@ def processBuffer(ctx):
 # Tests.
 #
 
-assert Whirlpool('The quick brown fox jumps over the lazy dog').hexdigest() == \
-       'b97de512e91e3828b40d2b0fdce9ceb3c4a71f9bea8d88e75c4fa854df36725fd2b52eb6544edcacd6f8beddfea403cb55ae31f03ad62a5ef54e42ee82c3fb35'
-assert Whirlpool('The quick brown fox jumps over the lazy eog').hexdigest() == \
-       'c27ba124205f72e6847f3e19834f925cc666d0974167af915bb462420ed40cc50900d85a1f923219d832357750492d5c143011a76988344c2635e69d06f2d38c'
-assert Whirlpool('').hexdigest() == \
-       '19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3'
+if __name__ == '__main__':
+       assert Whirlpool('The quick brown fox jumps over the lazy dog').hexdigest() == \
+               'b97de512e91e3828b40d2b0fdce9ceb3c4a71f9bea8d88e75c4fa854df36725fd2b52eb6544edcacd6f8beddfea403cb55ae31f03ad62a5ef54e42ee82c3fb35'
+       assert Whirlpool('The quick brown fox jumps over the lazy eog').hexdigest() == \
+               'c27ba124205f72e6847f3e19834f925cc666d0974167af915bb462420ed40cc50900d85a1f923219d832357750492d5c143011a76988344c2635e69d06f2d38c'
+       assert Whirlpool('').hexdigest() == \
+               '19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3'