Update junitxml.py
This commit is contained in:
parent
dc0fc9f70a
commit
e5f87af9c4
|
@ -645,7 +645,7 @@ class LogXML:
|
|||
|
||||
def pytest_sessionfinish(self) -> None:
|
||||
dirname = os.path.dirname(os.path.abspath(self.logfile))
|
||||
if not os.path.isdir(dirname):
|
||||
# exist_ok avoids filesystem race conditions between checking path existence and requesting creation
|
||||
os.makedirs(dirname, exist_ok=True)
|
||||
|
||||
with open(self.logfile, "w", encoding="utf-8") as logfile:
|
||||
|
|
Loading…
Reference in New Issue