Skip to content

Commit 8452856

Browse files
committed
Fix parallel logging tests
1 parent 4e211ce commit 8452856

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ node_modules
44
.DS_Store
55
website_and_docs/.hugo_build.lock
66
website_and_docs/resources
7-
7+
*.png
8+
*.log
9+
*.py[cod]
10+
__pycache__/
11+
.tox/
12+
venv/
813
**/target/*
914
.classpath
1015
.project
1116
.settings
12-
.gitignore
1317
.pydevproject
1418
**/*.iml
1519
**/.gradle

examples/python/tests/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
import subprocess
55
import tempfile
66
import time
7-
from selenium.webdriver.common.utils import free_port
7+
import uuid
88
from datetime import datetime
99
from urllib.request import urlopen
10-
import requests
11-
from requests.auth import HTTPBasicAuth
1210

1311
import pytest
12+
import requests
13+
from requests.auth import HTTPBasicAuth
1414
from selenium import webdriver
15+
from selenium.webdriver.common.utils import free_port
1516

1617

1718
def pytest_configure(config):
@@ -96,8 +97,7 @@ def log():
9697

9798
@pytest.fixture(scope='function')
9899
def log_path():
99-
suffix = datetime.now().strftime("%y%m%d_%H%M%S")
100-
log_path = 'log_file_' + suffix + '.log'
100+
log_path = f'log_file_{uuid.uuid4()}.log'
101101

102102
yield log_path
103103

examples/python/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ deps =
2525
-r requirements.txt
2626
commands =
2727
# "-vv" means extra verbose
28-
pytest -vv -n auto {posargs:.}
28+
pytest -vv -n auto {tty:--color=yes} {posargs:.}

0 commit comments

Comments
 (0)