Skip to content

Commit 275b3b1

Browse files
authored
Use -munittest instead of setup.py test to run tests (nephila#39)
The support for latter invocation will be removed at some point from setuptools
1 parent ba1187d commit 275b3b1

8 files changed

Lines changed: 7 additions & 6 deletions

File tree

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Tests
104104

105105
::
106106

107-
python setup.py test
107+
python -munittest
108108

109109
License
110110
==================

changes/29.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update tests invocation method to avoid future breakages

giturlparse/platforms/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def __init__(self):
3636

3737
@staticmethod
3838
def clean_data(data):
39+
print(data)
3940
data["path"] = ""
4041
data["branch"] = ""
4142
data["protocols"] = list(filter(lambda x: x, data["protocols"].split("+")))

giturlparse/tests/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from . import parse, rewrite # NOQA

tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def towncrier_check(c): # NOQA
9090
@task
9191
def test(c):
9292
"""Run test in local environment."""
93-
c.run("python setup.py test")
93+
c.run("python -munittest")
9494

9595

9696
@task
@@ -103,8 +103,8 @@ def test_all(c):
103103
def coverage(c):
104104
"""Run test with coverage in local environment."""
105105
c.run("coverage erase")
106-
c.run("run setup.py test")
107-
c.run("report -m")
106+
c.run("coverage run -m unittest")
107+
c.run("coverage report -m")
108108

109109

110110
@task

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ envlist =
1111
skip_missing_interpreters = true
1212

1313
[testenv]
14-
commands = {env:COMMAND:python} setup.py test
14+
commands = {env:COMMAND:python} -m unittest
1515
deps =
1616
-r{toxinidir}/requirements-test.txt
1717
passenv =

0 commit comments

Comments
 (0)