mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 08:12:15 -04:00
Make python setup.py test use pytest for acme (#6072)
This commit is contained in:
parent
d905886f4c
commit
868e5b831b
1 changed files with 17 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from setuptools import setup
|
||||
from setuptools import find_packages
|
||||
|
||||
from setuptools.command.test import test as TestCommand
|
||||
import sys
|
||||
|
||||
version = '0.25.0.dev0'
|
||||
|
||||
|
|
@ -33,6 +34,19 @@ docs_extras = [
|
|||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='acme',
|
||||
|
|
@ -65,5 +79,7 @@ setup(
|
|||
'dev': dev_extras,
|
||||
'docs': docs_extras,
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='acme',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue