Example #1
0
 def test_texts_fail(self):
     for t in self.texts:
         with self.assertRaises(ArgumentTypeError):
             floating(t, allow_nan=True, allow_inf=True)
Example #2
0
 def test_special_floats_fail(self):
     for f in self.normal_floats:
         self.assertIsInstance(
             floating(f, allow_nan=False, allow_inf=False), float)
Example #3
0
 def test_floating_points_pass(self):
     for f in self.normal_floats:
         self.assertIsInstance(floating(f, allow_nan=True, allow_inf=True),
                               float)
Example #4
0
 def test_special_floats_pass(self):
     for f in self.special_floats:
         self.assertIsInstance(floating(f, allow_nan=True, allow_inf=True),
                               float)
Example #5
0
 def test_integers_pass(self):
     for i in self.valid_ints:
         self.assertIsInstance(floating(i, allow_nan=True, allow_inf=True),
                               float)