-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
31 lines (21 loc) · 961 Bytes
/
conftest.py
File metadata and controls
31 lines (21 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import pytest
import tempfile
pytest_plugins = [
'src.encoded_core.tests.datafixtures'
]
def pytest_addoption(parser):
parser.addoption("--es", action="store", default="", dest='es',
help="use a remote es for testing")
parser.addoption("--aws-auth", action="store_true",
help="connect using aws authorization")
@pytest.fixture(scope='session')
def remote_es(request):
return request.config.getoption("--es")
@pytest.fixture(scope='session')
def aws_auth(request):
return request.config.getoption("--aws-auth")
def pytest_configure():
# This adjustment is important to set the default choice of temporary filenames to a nice short name
# because without it some of the filenames we generate end up being too long, and critical functionality
# ends up failing. Some socket-related filenames, for example, seem to have length limits. -kmp 5-Jun-2020
tempfile.tempdir = '/tmp'