Beispiel #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"]),
     )
Beispiel #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"]),
     )
Beispiel #3
0
 def test_refuse_when_separator_doesnot_match(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pc sresource op a", ["3", "8", "2", "1"]),
     )
Beispiel #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"]),
     )
Beispiel #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"])
     )
Beispiel #6
0
 def test_refuse_when_separator_doesnot_match(self):
     self.assertRaises(
         EnvironmentError,
         lambda: _split_words("pc sresource op a", ["3", "8", "2", "1"])
     )
Beispiel #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"])
     )
Beispiel #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"])
     )