Skip to content

Commit 30a1a07

Browse files
committed
Replace nose with pytest
Signed-off-by: George Melikov <mail@gmelikov.ru>
1 parent faf2424 commit 30a1a07

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

test-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
hacking<3 # Apache-2.0
2-
nose==1.3.7 # LGPL
3-
nose-timer>=0.6.0,<1 # MIT
2+
pytest>=8.0.0,<9.0.0 # MIT License (MIT)
3+
pytest-timer>=1.0.0,<2.0.0 # MIT License (MIT)
44
coverage>=3.6,<6 # Apache-2.0
55
mock>=1.0.1,<3.0.5 # BSD

tox.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ project_name = httpetcd
1313
[testenv]
1414
setenv =
1515
PYTHONDONTWRITEBYTECODE = 1
16-
TEST_PATH={[base]project_name}.tests.unit
17-
functional: TEST_PATH={[base]project_name}.tests.functional
16+
PACKAGE_NAME=httpetcd
17+
TEST_PATH={[base]project_name}/tests/unit
18+
functional: TEST_PATH={[base]project_name}/tests/functional
1819
passenv = CI_*
1920
functional: ETCD_ENDPOINT
2021
deps = -r{toxinidir}/requirements.txt
2122
-r{toxinidir}/test-requirements.txt
2223
commands =
23-
coverage run -p --source {toxinidir}/{[base]project_name} -m nose {posargs} {env:TEST_PATH} --with-timer --with-xunit
24+
coverage run -p -m pytest {posargs} --timer-top-n=10 {env:TEST_PATH}
2425

2526
[testenv:pep8]
2627
deps = hacking<3
@@ -49,7 +50,7 @@ basepython = python3
4950
envdir = {toxworkdir}/cover
5051
commands =
5152
coverage erase
52-
coverage run -m nose {posargs} {[base]project_name}.tests.unit
53+
coverage run -m pytest {posargs} {[base]project_name}.tests.unit
5354
coverage html -d cover
5455
coverage report --skip-covered
5556

0 commit comments

Comments
 (0)