示例#1
0
 def test08_get_args_dirmode_no_dir_fail(self):
     with self.assertRaises(SystemExit):
         pgrep_sync.get_args()
示例#2
0
 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)
示例#3
0
 def test06_get_args_dirmode_one_dir_success(self):
     self.assertEqual(pgrep_sync.get_args().word, 'word')
     self.assertEqual(pgrep_sync.get_args().directories, ['.'])
示例#4
0
 def test07_get_args_dirmode_multiple_dirs_success(self):
     self.assertEqual(pgrep_sync.get_args().word, 'word')
     self.assertEqual(pgrep_sync.get_args().directories, ['.', '../'])
示例#5
0
 def test05_get_args_filemode_set_recursive_fail(self):
     with self.assertRaises(SystemExit):
         pgrep_sync.get_args()
示例#6
0
 def test04_get_args_filemode_no_path_fail(self):
     with self.assertRaises(SystemExit):
         pgrep_sync.get_args()
示例#7
0
 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'])
示例#8
0
 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'])
示例#9
0
 def test01_get_args_no_word_fail(self):
     with self.assertRaises(SystemExit):
         pgrep_sync.get_args()