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