assert_files_exist('test1')
assert_files_not_exist('test2')
+ assert subprocess.call(
+ [sys.executable, test_prog_path, "test3"]) == 1 # not exists
+ assert subprocess.call(
+ [sys.executable, test_prog_path, "-f", "test3"]) == 0
+
def test_rm_recursive():
create_files(['test'])
[sys.executable, test_prog_path, "-r", "subdir"]) == 0
assert_files_exist('test')
assert_files_not_exist(['subdir/subd2/test'])
+
+ assert subprocess.call(
+ [sys.executable, test_prog_path, "-r", "test3"]) == 1 # not exists
+ assert subprocess.call(
+ [sys.executable, test_prog_path, "-rf", "test3"]) == 0