Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'certbot-apache/setup.py')
-rw-r--r--certbot-apache/setup.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/certbot-apache/setup.py b/certbot-apache/setup.py
index 52528a536..5d15611dd 100644
--- a/certbot-apache/setup.py
+++ b/certbot-apache/setup.py
@@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
+from setuptools.command.test import test as TestCommand
+import sys
version = '0.32.0.dev0'
@@ -21,6 +23,22 @@ 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='certbot-apache',
version=version,
@@ -64,4 +82,6 @@ setup(
],
},
test_suite='certbot_apache',
+ tests_require=["pytest"],
+ cmdclass={"test": PyTest},
)