Skip to content

Commit

Permalink
Use random temp folder for EnvVarTestContext
Browse files Browse the repository at this point in the history
  • Loading branch information
agoncharov-reef committed Mar 26, 2024
1 parent 98ea664 commit d75670a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d75670a

Please sign in to comment.