From d75670a8d71f90b88302e3ea07f2c5372f8e61d4 Mon Sep 17 00:00:00 2001 From: Aleksandr Goncharov Date: Tue, 26 Mar 2024 15:40:04 +0300 Subject: [PATCH] Use random temp folder for EnvVarTestContext --- test/integration/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/helpers.py b/test/integration/helpers.py index b1feaaee3..c8752e3aa 100755 --- a/test/integration/helpers.py +++ b/test/integration/helpers.py @@ -29,7 +29,7 @@ from datetime import datetime, timedelta from os import environ, linesep, path from pathlib import Path -from tempfile import gettempdir, mkdtemp, mktemp +from tempfile import mkdtemp, mktemp import backoff from b2sdk.v2 import ( @@ -349,7 +349,7 @@ def __init__(self, account_info_file_name: str): def __enter__(self): src = self.account_info_file_name - dst = path.join(gettempdir(), 'b2_account_info') + dst = path.join(mkdtemp(), 'b2_account_info') shutil.copyfile(src, dst) shutil.move(src, src + self.suffix) environ[self.ENV_VAR] = dst