Skip to content

Commit 16a212b

Browse files
authored
Update setup.py
1 parent 7447583 commit 16a212b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"six>=1.8.0",
1111
]
1212
long_description = open("README.md", "r").read()
13-
tests_require = ["pytest", "pytest-cov", "codecov"]
13+
tests_require = ["pytest"]
1414

1515
about = {}
1616
with open("stream_chat/__pkg__.py") as fp:
@@ -25,8 +25,14 @@ def finalize_options(self):
2525
def run_tests(self):
2626
# import here, cause outside the eggs aren't loaded
2727
import pytest
28+
pytest_cmd = ["stream_chat/", "-v", "--cov=stream_chat/"]
2829

29-
errno = pytest.main(["stream_chat/", "-v", "--cov=stream_chat/", "--cov-report=html", "--cov-report=annotate"])
30+
try:
31+
import pytest_cov
32+
except ImportError:
33+
pytest_cmd += ["--cov-report=html", "--cov-report=annotate"]
34+
35+
errno = pytest.main(pytest_cmd)
3036
sys.exit(errno)
3137

3238

0 commit comments

Comments
 (0)