Skip to content
Snippets Groups Projects
Commit acb75a05 authored by Bryce Guinta's avatar Bryce Guinta
Browse files

Use pytest as default test runner instead of unittest for tox

There was some trouble getting this to work. I needed to use
--pyargs for pytest to work in tox

Allow for test file prefix unittest_ to be changed to standard test_
Helps with updating the astroid tests to standard pytest conventions

Make pytest use proper test directory by default
parent 5688add2
No related branches found
No related tags found
No related merge requests found
[wheel]
universal = 1
[tool:pytest]
python_files = unittest_*
python_files = unittest_* test_*.py
testpaths = astroid/tests
Loading
Loading
@@ -27,7 +27,11 @@ setenv =
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
 
commands =
python -Wi -m coverage run -m unittest {posargs: discover -s astroid/tests -p "unittest*.py"}
; --pyargs is needed so the directory astroid doesn't shadow the tox
; installed astroid package
; This is important for tests' test data which create files
; inside the package
python -Wi {envsitepackagesdir}/coverage run -m pytest --pyargs astroid {posargs:}
; Transform absolute path to relative path
; for compatibility with coveralls.io and fix 'source not available' error.
; If you can find a cleaner way is welcome
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment