Permalink
Browse files

Added test for hashing negative numbers

  • Loading branch information...
Dan Lecocq
Dan Lecocq committed Jan 20, 2014
1 parent 4284284 commit 5a921f39888c8eb6adec952071003c2a656650c2
Showing with 5 additions and 0 deletions.
  1. +5 −0 { → test}/test.py
View
@@ -117,6 +117,11 @@ def test_shuffled(self):
random.shuffle(shuffled)
self.assertNotMatch(TestHash.jabberwocky, ' '.join(shuffled))
+ def test_negative_numbers(self):
+ # We should be able to hash on negative numbers. In not throwing an
+ # exception, this test passes
+ simhash.hash_fp(range(-10, 10))
+
class TestSimhash(unittest.TestCase):
def setUp(self):

0 comments on commit 5a921f3

Please sign in to comment.