Beispiel #1
0
 def test_safeArgs_list_with_None(self):
     self.assertEqual(list(glyph.safeArgs([1, 5.1, 6, None])), [1, 5.1, 6])
Beispiel #2
0
 def test_safeArgs_list_all_numbers(self):
     self.assertEqual(list(glyph.safeArgs([1, 5.1, 6])), [1, 5.1, 6])
Beispiel #3
0
 def test_safeArgs_list_with_inf(self):
     self.assertEqual(list(glyph.safeArgs([1, 5.1, 6,
                                           float('inf')])), [1, 5.1, 6])
Beispiel #4
0
 def test_safeArgs_empty_string(self):
     self.assertEqual(list(glyph.safeArgs('')), [])
Beispiel #5
0
 def test_safeArgs_list_with_string(self):
     with self.assertRaises(TypeError):
         self.assertEqual(list(glyph.safeArgs(['a', 5.1, 6])),
                          ['a', 5.1, 6])
Beispiel #6
0
 def test_safeArgs_all_strings(self):
     with self.assertRaises(TypeError):
         list(glyph.safeArgs(['a', 'b', 'c']))
Beispiel #7
0
 def test_safeArgs_number_not_list(self):
     with self.assertRaises(TypeError):
         glyph.safeArgs(1)
Beispiel #8
0
 def test_safeArgs_None(self):
     with self.assertRaises(TypeError):
         glyph.safeArgs(None)