From 42caa515b19bbf9ffa69aa8185213dd363f929bb Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Thu, 14 Dec 2023 13:26:20 -0800 Subject: [PATCH] Update. --- src/braingeneers/utils/common_utils_test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/braingeneers/utils/common_utils_test.py b/src/braingeneers/utils/common_utils_test.py index 3876fbe..bc33ca4 100644 --- a/src/braingeneers/utils/common_utils_test.py +++ b/src/braingeneers/utils/common_utils_test.py @@ -3,7 +3,6 @@ import common_utils # Updated import statement import os import tempfile -from pathlib import Path class TestFileListFunction(unittest.TestCase): @@ -32,9 +31,9 @@ def test_s3_no_files(self, mock_s3_client): def test_local_files_exist(self): with tempfile.TemporaryDirectory() as temp_dir: - # Create temporary files - Path(temp_dir, 'tempfile1.txt').touch() - Path(temp_dir, 'tempfile2.txt').touch() + for f in ['tempfile1.txt', 'tempfile2.txt']: + with open(os.path.join(temp_dir, f), 'w') as w: + w.write('nothing') result = common_utils.file_list(temp_dir) # Updated to common_utils # The result should contain two files with their details