mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-22 13:36:15 +03:00
Split tests to python2 and python3
This commit is contained in:
parent
20dbeaffa6
commit
06526d9457
11
Makefile
11
Makefile
|
@ -42,10 +42,17 @@ install: uninstall clean cythonize
|
|||
uninstall:
|
||||
- pip uninstall -y -q dependency-injector 2> /dev/null
|
||||
|
||||
test: build
|
||||
test-py2: build
|
||||
# Unit tests with coverage report
|
||||
coverage erase
|
||||
coverage run --rcfile=./.coveragerc -m unittest2 discover tests/unit
|
||||
coverage run --rcfile=./.coveragerc -m unittest2 discover -s tests/unit/ -p test_*_py2_py3.py
|
||||
coverage report --rcfile=./.coveragerc
|
||||
coverage html --rcfile=./.coveragerc
|
||||
|
||||
test-py3: build
|
||||
# Unit tests with coverage report
|
||||
coverage erase
|
||||
coverage run --rcfile=./.coveragerc -m unittest2 discover -s tests/unit/ -p test_*py3.py
|
||||
coverage report --rcfile=./.coveragerc
|
||||
coverage html --rcfile=./.coveragerc
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@ if asyncio:
|
|||
def _example(arg1, arg2, arg3, arg4):
|
||||
future = asyncio.Future()
|
||||
future.set_result(None)
|
||||
for _ in future:
|
||||
yield _
|
||||
yield from future
|
||||
return arg1, arg2, arg3, arg4
|
||||
|
||||
def _run(coro):
|
14
tox.ini
14
tox.ini
|
@ -6,11 +6,11 @@ envlist=
|
|||
deps=
|
||||
unittest2
|
||||
commands=
|
||||
unit2 discover tests/unit
|
||||
unit2 discover -s tests/unit -p test_*_py3.py
|
||||
|
||||
[testenv:coveralls]
|
||||
passenv=TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH DEPENDENCY_INJECTOR_DEBUG_MODE
|
||||
basepython=python2.7
|
||||
basepython=python3.6
|
||||
usedevelop=True
|
||||
deps=
|
||||
{[testenv]deps}
|
||||
|
@ -19,10 +19,18 @@ deps=
|
|||
coveralls
|
||||
commands=
|
||||
coverage erase
|
||||
coverage run --rcfile=./.coveragerc -m unittest2 discover tests/unit
|
||||
coverage run --rcfile=./.coveragerc -m unittest2 discover -s tests/unit/ -p test_*_py3.py
|
||||
coverage report --rcfile=./.coveragerc
|
||||
coveralls
|
||||
|
||||
[testenv:py26]
|
||||
commands=
|
||||
unit2 discover -s tests/unit -p test_*_py2_py3.py
|
||||
|
||||
[testenv:py27]
|
||||
commands=
|
||||
unit2 discover -s tests/unit -p test_*_py2_py3.py
|
||||
|
||||
[testenv:pylint]
|
||||
deps=
|
||||
pylint
|
||||
|
|
Loading…
Reference in New Issue
Block a user