From b0733ae07f32c2082ddefebf5bd69d33b8b7c969 Mon Sep 17 00:00:00 2001 From: SET Date: Sun, 16 Aug 2020 00:23:43 -0300 Subject: [PATCH] Fixed tests that change directory when we run the test on a temporal. --- tests/utils/context.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/utils/context.py b/tests/utils/context.py index 94b491a9..a524ec29 100644 --- a/tests/utils/context.py +++ b/tests/utils/context.py @@ -156,8 +156,9 @@ class TestContext(object): def do_run(self, cmd, ret_val=None, use_a_tty=False, chdir_out=False): cmd_base = [COVERAGE_SCRIPT, 'run', '-a'] if chdir_out: - cmd_base.append('--rcfile=../../.coveragerc') - os.environ['COVERAGE_FILE'] = os.path.join(os.getcwd(), '.coverage') + cwd = os.getcwd() + cmd_base.append('--rcfile='+os.path.join(cwd, '.coveragerc')) + os.environ['COVERAGE_FILE'] = os.path.join(cwd, '.coverage') cmd = cmd_base+cmd logging.debug(cmd) out_filename = self.get_out_path('output.txt')