Skip to content

Commit 1331743

Browse files
authored
Update pytest infrastructure, add pytest-cov package (#250)
Since travis isn't used as of #245 this isn't a travis thing.
2 parents fde7f03 + 0c34b4a commit 1331743

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ libtmux = {path = ".",editable = true}
1414
black = "==19.3b0"
1515
sphinx-issues = "*"
1616
pytest-cov = "*"
17+
coverage = "*"
1718

1819
[packages]
1920

Pipfile.lock

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements/test.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
pytest==4.5.0
1+
pytest<6
2+
pytest-cov
3+
coverage

setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import sys
1010

1111
from setuptools import setup
12-
from setuptools.command.test import test as TestCommand
1312

1413
about = {}
1514
with open("libtmux/__about__.py") as fp:
@@ -26,20 +25,6 @@
2625
history = open('CHANGES').read().replace('.. :changelog:', '')
2726

2827

29-
class PyTest(TestCommand):
30-
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
31-
32-
def initialize_options(self):
33-
TestCommand.initialize_options(self)
34-
self.pytest_args = []
35-
36-
def run_tests(self):
37-
import pytest
38-
39-
errno = pytest.main(self.pytest_args)
40-
sys.exit(errno)
41-
42-
4328
setup(
4429
name=about['__title__'],
4530
version=about['__version__'],
@@ -58,7 +43,6 @@ def run_tests(self):
5843
packages=['libtmux'],
5944
include_package_data=True,
6045
tests_require=tests_reqs,
61-
cmdclass={'test': PyTest},
6246
zip_safe=False,
6347
keywords=about['__title__'],
6448
classifiers=[

0 commit comments

Comments
 (0)