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 'setup.py')
-rw-r--r--setup.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 14fef37f3..26a1c4293 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,10 @@
import codecs
import os
import re
+import sys
from setuptools import find_packages, setup
+from setuptools.command.test import test as TestCommand
# Workaround for http://bugs.python.org/issue8876, see
# http://bugs.python.org/issue8876#msg208792
@@ -77,6 +79,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',
version=version,
@@ -123,6 +141,8 @@ setup(
# to test all packages run "python setup.py test -s
# {acme,certbot_apache,certbot_nginx}"
test_suite='certbot',
+ tests_require=["pytest"],
+ cmdclass={"test": PyTest},
entry_points={
'console_scripts': [