def test_a_list_with_only_hooks_returns_all_hooks(self): test_list = [ {"test_file": "file1:js"}, {"test_file": "file2:js"}, {"test_file": "file3:js"}, {"test_file": "file4:js"}, {"test_file": "file5:js"}, ] (tests, hooks) = grs.split_hook_runs_out(test_list) self.assertEqual(len(tests), 0) self.assertEqual(len(hooks), 5)
def test_a_list_with_no_hooks_returns_no_hooks(self): test_list = [ {"test_file": "file1.js"}, {"test_file": "file2.js"}, {"test_file": "file3.js"}, {"test_file": "file4.js"}, {"test_file": "file5.js"}, ] (tests, hooks) = grs.split_hook_runs_out(test_list) self.assertEqual(len(tests), 5) self.assertEqual(len(hooks), 0)
def test_a_list_with_a_mix_of_test_and_hooks_returns_both(self): test_list = [ {"test_file": "file1:js"}, {"test_file": "file2.js"}, {"test_file": "file3:js"}, {"test_file": "file4.js"}, {"test_file": "file5:js"}, ] (tests, hooks) = grs.split_hook_runs_out(test_list) self.assertEqual(len(tests), 2) self.assertEqual(len(hooks), 3)
def test_a_list_with_only_hooks_returns_all_hooks(self): test_list = [ {"test_file": "file1:js"}, {"test_file": "file2:js"}, {"test_file": "file3:js"}, {"test_file": "file4:js"}, {"test_file": "file5:js"}, ] (tests, hooks) = grs.split_hook_runs_out(test_list) self.assertEqual(len(tests), 0) self.assertEqual(len(hooks), 5)
def test_a_list_with_no_hooks_returns_no_hooks(self): test_list = [ {"test_file": "file1.js"}, {"test_file": "file2.js"}, {"test_file": "file3.js"}, {"test_file": "file4.js"}, {"test_file": "file5.js"}, ] (tests, hooks) = grs.split_hook_runs_out(test_list) self.assertEqual(len(tests), 5) self.assertEqual(len(hooks), 0)
def test_a_list_with_a_mix_of_test_and_hooks_returns_both(self): test_list = [ {"test_file": "file1:js"}, {"test_file": "file2.js"}, {"test_file": "file3:js"}, {"test_file": "file4.js"}, {"test_file": "file5:js"}, ] (tests, hooks) = grs.split_hook_runs_out(test_list) self.assertEqual(len(tests), 2) self.assertEqual(len(hooks), 3)