コード例 #1
0
 def test_safeMax_list_with_nan(self):
     self.assertEqual(glyph.safeMax([1, 5.1, 6, float('Nan')]), 6)
コード例 #2
0
 def test_safeMax_list_with_string(self):
     with self.assertRaises(TypeError):
         glyph.safeMax(['a', 10, 30])
コード例 #3
0
 def test_safeMax_list_all_numbers(self):
     self.assertEqual(glyph.safeMax([
         1,
         5.1,
         6,
     ]), 6)
コード例 #4
0
 def test_safeMax_number_not_list(self):
     with self.assertRaises(TypeError):
         glyph.safeMax(1)
コード例 #5
0
 def test_safeMax_empty_string(self):
     self.assertEqual(glyph.safeMax(''), None)
コード例 #6
0
 def test_safeMax_None(self):
   with self.assertRaises(TypeError):
     glyph.safeMax(None)
コード例 #7
0
 def test_safeMax_None(self):
     with self.assertRaises(TypeError):
         glyph.safeMax(None)
コード例 #8
0
 def test_safeMax_list_with_nan(self):
   self.assertEqual(glyph.safeMax([1,5.1,6,float('Nan')]), 6)
コード例 #9
0
 def test_safeMax_list_all_numbers(self):
   self.assertEqual(glyph.safeMax([1,5.1,6,]), 6)
コード例 #10
0
 def test_safeMax_list_with_string(self):
   with self.assertRaises(TypeError):
     glyph.safeMax(['a',10,30])
コード例 #11
0
 def test_safeMax_empty_string(self):
   self.assertEqual(glyph.safeMax(''), None)
コード例 #12
0
 def test_safeMax_number_not_list(self):
   with self.assertRaises(TypeError):
     glyph.safeMax(1)