Beispiel #1
0
 def test_num_to_point_many(self):
     """
     test that numbers get mapped to unique points
     """
     card = 1000
     nums = range(card)
     
     points = [pub.num_to_point(num) for num in nums]
     
     self.assertEqual(len(set(points)), card)
Beispiel #2
0
 def test_num_to_point_to_num(self):
     
     for num in range(15*8)[::4]:
         p = pub.num_to_point(2**num)
         self.assertEqual(pub.point_to_num(p), 2**num)
Beispiel #3
0
 def test_num_to_point_one(self):
     
     p = pub.num_to_point(1)
     self.assertTrue(p.is_valid())