From 1ea27390af932048007308f104683bf04cc1fae7 Mon Sep 17 00:00:00 2001 From: Bongjin Koo Date: Tue, 17 May 2022 15:18:09 -0700 Subject: [PATCH] Issue #74: Add check flag for subprocess in test_datasets.py. --- tests/test_datasets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_datasets.py b/tests/test_datasets.py index b8b528f..f69f7e9 100644 --- a/tests/test_datasets.py +++ b/tests/test_datasets.py @@ -92,7 +92,7 @@ def test_upload_valid(setup, set_file_path): line = file_list.readline() assert file_exists - subprocess.run(f"rm {set_file_path[0]}{set_file_path[1]}", shell=True) + subprocess.run(f"rm {set_file_path[0]}{set_file_path[1]}", shell=True, check=True) def test_upload_invalid_because_no_local_path(setup): @@ -111,7 +111,7 @@ def test_download_valid(setup, set_file_path): """Test the download method.""" setup.download(set_file_path[1], set_file_path[0] + set_file_path[1]) assert os.path.exists(set_file_path[0] + set_file_path[1]) - subprocess.run(f"rm {set_file_path[0]}{set_file_path[1]}", shell=True) + subprocess.run(f"rm {set_file_path[0]}{set_file_path[1]}", shell=True, check=True) def test_download_invalid_because_no_remote_path(setup):