diff --git a/tests/test_immv_imcp.py b/tests/test_immv_imcp.py index 4b83caf3a3024501dabad35a7be1d184980723f5..85e2bb2ea8dfedc702eef9270f84afbea98a4027 100644 --- a/tests/test_immv_imcp.py +++ b/tests/test_immv_imcp.py @@ -335,8 +335,8 @@ def test_imcp_script_shouldPass(move=False): print('indir before: ', os.listdir(indir)) print('outdir before: ', os.listdir(outdir)) - if move: immv_script.main(imcp_args) - else: imcp_script.main(imcp_args) + if move: assert immv_script.main(imcp_args) == 0 + else: assert imcp_script.main(imcp_args) == 0 print('indir after: ', os.listdir(indir)) print('outdir after: ', os.listdir(outdir)) @@ -358,7 +358,6 @@ def test_imcp_script_shouldPass(move=False): shutil.rmtree(outdir) - def test_imcp_script_shouldFail(move=False): # - len(srcs) > 1 and dest is not dir @@ -453,6 +452,15 @@ def test_imcp_script_shouldFail(move=False): shutil.rmtree(indir) shutil.rmtree(outdir) + # Other failure cases + if move: assert immv_script.main() != 0 + else: assert imcp_script.main() != 0 + if move: assert immv_script.main([]) != 0 + else: assert imcp_script.main([]) != 0 + if move: assert immv_script.main(['wa']) != 0 + else: assert imcp_script.main(['wa']) != 0 + + def test_immv_script_shouldPass(): test_imcp_script_shouldPass(move=True)