def test_any_list_with_nan(self):
     self.assertTrue(glyph.any([1, 5.1, 6, float('Nan')]), 12.1)
 def test_any_list_with_string(self):
     self.assertTrue(glyph.any(['a', 10, 30]))
 def test_any_list_all_numbers(self):
     self.assertTrue(glyph.any([
         1,
         5.1,
         6,
     ]))
 def test_any_list_with_false(self):
     self.assertFalse(glyph.any([False]))
 def test_any_list_with_0(self):
     self.assertFalse(glyph.any([0]))
 def test_any_number_not_list(self):
     with self.assertRaises(TypeError):
         glyph.any(1)
 def test_any_empty_string(self):
     self.assertFalse(glyph.any(''))
Пример #8
0
 def test_any_list_with_nan(self):
   self.assertTrue(glyph.any([1,5.1,6,float('Nan')]), 12.1)
 def test_any_None(self):
     with self.assertRaises(TypeError):
         glyph.any(None)
Пример #10
0
 def test_any_list_with_string(self):
   self.assertTrue(glyph.any(['a',10,30]))
Пример #11
0
 def test_any_list_all_numbers(self):
   self.assertTrue(glyph.any([1,5.1,6,]))
Пример #12
0
 def test_any_list_with_0(self):
   self.assertFalse(glyph.any([0]))
Пример #13
0
 def test_any_list_with_false(self):
   self.assertFalse(glyph.any([False]))
Пример #14
0
 def test_any_empty_string(self):
   self.assertFalse(glyph.any(''))
Пример #15
0
 def test_any_number_not_list(self):
   with self.assertRaises(TypeError):
     glyph.any(1)
Пример #16
0
 def test_any_None(self):
   with self.assertRaises(TypeError):
     glyph.any(None)