Пример #1
0
 def test_refuse_when_lengths_are_too_small(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pcs resource op a ", ["3", "8", "2", "1"]),
     )
Пример #2
0
 def test_refuse_when_no_int_in_lengths(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pcs resource op a", ["3", "8", "2", "A"]),
     )
Пример #3
0
 def test_refuse_when_separator_doesnot_match(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pc sresource op a", ["3", "8", "2", "1"]),
     )
Пример #4
0
 def test_return_word_list_on_compatible_words_and_lenght(self):
     self.assertEqual(
         ["pcs", "resource", "op", "a"],
         _split_words("pcs resource op a", ["3", "8", "2", "1"]),
     )
Пример #5
0
 def test_refuse_when_lengths_are_too_small(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pcs resource op a ", ["3", "8", "2", "1"])
     )
Пример #6
0
 def test_refuse_when_separator_doesnot_match(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pc sresource op a", ["3", "8", "2", "1"])
     )
Пример #7
0
 def test_refuse_when_no_int_in_lengths(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pcs resource op a", ["3", "8", "2", "A"])
     )
Пример #8
0
 def test_return_word_list_on_compatible_words_and_lenght(self):
     self.assertEqual(
         ["pcs", "resource", "op", "a"],
         _split_words("pcs resource op a", ["3", "8", "2", "1"])
     )