From fd76cdbdeb01a20bd44e066b9679e044a1bd2488 Mon Sep 17 00:00:00 2001 From: clanmills Date: Sun, 26 Apr 2020 11:42:40 +0100 Subject: [PATCH] Simplified CopyTmpFiles.setUp_file_action() by using _config_variables['tmp_path'] --- tests/system_tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/system_tests.py b/tests/system_tests.py index 1c750905..78e52b98 100644 --- a/tests/system_tests.py +++ b/tests/system_tests.py @@ -474,9 +474,8 @@ class CopyTmpFiles(FileDecoratorBase): FILE_LIST_NAME = '_tmp_files' def setUp_file_action(self, expanded_file_name): - fname, ext = os.path.splitext(expanded_file_name) - tmp_dir = os.path.join(os.path.dirname(os.path.dirname(expanded_file_name)),'tmp') - tmp_name = os.path.join(tmp_dir,os.path.basename(expanded_file_name)) + tmp_path = _config_variables['tmp_path'] + tmp_name = os.path.join(tmp_path,os.path.basename(expanded_file_name)) return shutil.copyfile(expanded_file_name, tmp_name) def tearDown_file_action(self, f):