Skip to content

Commit 3aee242

Browse files
committed
test(pytest): set python_path directly in pytest.ini
Previously the python_path used by pytest was only defined in tox.ini that could be a problem when pytest was run without tox. This commit setup python_path directly in the pytest configuration file.
1 parent a2bceb3 commit 3aee242

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pytest.ini

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[pytest]
22
norecursedirs = .git .* *.egg* old docs dist build
33
addopts = -p no:warnings
4+
python_paths = package/
45
filterwarnings =
56
# python3.4 raises this when importing setuptools
67
ignore:The value of convert_charrefs will become True in 3.5.*:DeprecationWarning

tox.ini

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ skipsdist = True
77
[testenv:pytest]
88
basepython = python3
99
skip_install = true
10-
setenv =
11-
PYTHONPATH = package/
1210
deps =
1311
botocore==1.18.3
1412
boto3==1.15.3
1513
moto==1.3.16
1614
pytest==6.0.2
1715
pytest-cov==2.10.1
16+
pytest-pythonpath==0.7.3
1817
commands =
1918
coverage run -m pytest tests/unit --cov package
2019

0 commit comments

Comments
 (0)