def test08_get_args_dirmode_no_dir_fail(self): with self.assertRaises(SystemExit): pgrep_sync.get_args()
def test07_get_args_dirmode_set_recursive_success(self): self.assertEqual(pgrep_sync.get_args().word, 'word') self.assertEqual(pgrep_sync.get_args().directories, ['.']) self.assertEqual(pgrep_sync.get_args().recursive, True)
def test06_get_args_dirmode_one_dir_success(self): self.assertEqual(pgrep_sync.get_args().word, 'word') self.assertEqual(pgrep_sync.get_args().directories, ['.'])
def test07_get_args_dirmode_multiple_dirs_success(self): self.assertEqual(pgrep_sync.get_args().word, 'word') self.assertEqual(pgrep_sync.get_args().directories, ['.', '../'])
def test05_get_args_filemode_set_recursive_fail(self): with self.assertRaises(SystemExit): pgrep_sync.get_args()
def test04_get_args_filemode_no_path_fail(self): with self.assertRaises(SystemExit): pgrep_sync.get_args()
def test03_get_args_filemode_multiple_paths_success(self): self.assertEqual(pgrep_sync.get_args().word, 'word') self.assertEqual(pgrep_sync.get_args().files, ['test.txt', 'test2.txt'])
def test02_get_args_filemode_one_path_success(self): self.assertEqual(pgrep_sync.get_args().word, 'word') self.assertEqual(pgrep_sync.get_args().files, ['test.txt'])
def test01_get_args_no_word_fail(self): with self.assertRaises(SystemExit): pgrep_sync.get_args()