Пример #1
0
 def test_nonsequence_exception(self):
     """
     Tests that ``is_empty()`` raises an exception when not passed a
     sequence object-type.
     """
     with self.assertRaises(TypeError):
         task_05.is_empty(None)
Пример #2
0
 def test_nonempty_string(self):
     """
     Tests that ``is_empty()`` returns False when passed a non-empty string.
     """
     self.assertFalse(task_05.is_empty('Ni'))
Пример #3
0
 def test_empty_string(self):
     """
     Tests that ``is_empty()`` returns True when passed an empty string.
     """
     self.assertTrue(task_05.is_empty(''))