Skip to content

Commit 96f00a6

Browse files
authored
Merge pull request #78 from textile/remove-pytest-runner
Remove pytest runner
2 parents e6f1a8a + 6a87898 commit 96f00a6

3 files changed

Lines changed: 15 additions & 19 deletions

File tree

README.textile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,15 @@ bc.. import textile
4343
h3. Notes:
4444

4545
* Active development supports Python 3.5 or later.
46+
47+
h3. Running Tests
48+
49+
To run the test suite, use pytest. `pytest-cov` is required as well.
50+
51+
When textile is installed locally:
52+
53+
bc.. pytest
54+
55+
When textile is not installed locally:
56+
57+
bc.. PYTHONPATH=. pytest

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[pytest]
22
testpaths = tests
3-
addopts = --cov=textile --cov-report=html --cov-append --cov-report=term-missing
3+
addopts = --cov=textile --cov-report=html --cov-append --cov-report=term-missing

setup.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,6 @@
44
import sys
55

66

7-
class PyTest(TestCommand):
8-
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
9-
10-
def initialize_options(self):
11-
TestCommand.initialize_options(self)
12-
self.pytest_args = []
13-
14-
def run_tests(self):
15-
import shlex
16-
#import here, cause outside the eggs aren't loaded
17-
import pytest
18-
errno = pytest.main(shlex.split(self.pytest_args))
19-
sys.exit(errno)
20-
21-
227
def get_version():
238
basedir = os.path.dirname(__file__)
249
with open(os.path.join(basedir, 'textile/version.py')) as f:
@@ -48,6 +33,7 @@ def get_version():
4833
'Programming Language :: Python :: 3.6',
4934
'Programming Language :: Python :: 3.7',
5035
'Programming Language :: Python :: 3.8',
36+
'Programming Language :: Python :: 3.9',
5137
'Topic :: Software Development :: Libraries :: Python Modules',
5238
],
5339
keywords='textile,text,html markup',
@@ -60,10 +46,8 @@ def get_version():
6046
'imagesize': ['Pillow>=3.0.0'],
6147
},
6248
entry_points={'console_scripts': ['pytextile=textile.__main__:main']},
63-
setup_requires=['pytest-runner'],
6449
tests_require=['pytest', 'pytest-cov'],
65-
cmdclass = {'test': PyTest},
6650
include_package_data=True,
6751
zip_safe=False,
68-
python_requires='~=3.5',
52+
python_requires='>=3.5',
6953
)

0 commit comments

Comments
 (0)