Refactor tests out of packaged module for dns plugins (#7599)

* Refactor tests out of module for certbot-dns-cloudflare

* Refactor tests out of module for certbot-dns-cloudxns

* Refactor tests out of module for certbot-dns-digitalocean

* Refactor tests out of module for certbot-dns-dnsimple

* Refactor tests out of module for certbot-dns-dnsmadeeasy

* Refactor tests out of module for certbot-dns-gehirn

* Refactor tests out of module for certbot-dns-google

* Refactor tests out of module for certbot-dns-linode

* Refactor tests out of module for certbot-dns-luadns

* Refactor tests out of module for certbot-dns-nsone

* Refactor tests out of module for certbot-dns-ovh

* Refactor tests out of module for certbot-dns-rfc2136

* Refactor tests out of module for certbot-dns-sakuracloud

* Refactor tests out of module for certbot-dns-route53

* Move certbot-dns-google testdata/ under tests/

* Use pytest for dns plugins

* Exclude pycache and .py[cod]
This commit is contained in:
ohemorange 2019-11-26 15:25:28 -08:00 committed by GitHub
parent 6d1472bf8c
commit b624172f68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 294 additions and 1 deletions

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -20,6 +22,20 @@ 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-dns-cloudflare',
version=version,
@ -63,5 +79,7 @@ setup(
'dns-cloudflare = certbot_dns_cloudflare._internal.dns_cloudflare:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_cloudflare',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -20,6 +22,20 @@ 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-dns-cloudxns',
version=version,
@ -63,5 +79,7 @@ setup(
'dns-cloudxns = certbot_dns_cloudxns._internal.dns_cloudxns:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_cloudxns',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -21,6 +23,20 @@ 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-dns-digitalocean',
version=version,
@ -64,5 +80,7 @@ setup(
'dns-digitalocean = certbot_dns_digitalocean._internal.dns_digitalocean:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_digitalocean',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,6 +1,8 @@
import os
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -32,6 +34,20 @@ 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-dns-dnsimple',
version=version,
@ -75,5 +91,7 @@ setup(
'dns-dnsimple = certbot_dns_dnsimple._internal.dns_dnsimple:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_dnsimple',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -20,6 +22,20 @@ 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-dns-dnsmadeeasy',
version=version,
@ -63,5 +79,7 @@ setup(
'dns-dnsmadeeasy = certbot_dns_dnsmadeeasy._internal.dns_dnsmadeeasy:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_dnsmadeeasy',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -19,6 +21,20 @@ 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-dns-gehirn',
version=version,
@ -62,5 +78,7 @@ setup(
'dns-gehirn = certbot_dns_gehirn._internal.dns_gehirn:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_gehirn',
cmdclass={"test": PyTest},
)

View file

@ -2,3 +2,6 @@ include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include certbot_dns_google/testdata *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -23,6 +25,20 @@ 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-dns-google',
version=version,
@ -66,5 +82,7 @@ setup(
'dns-google = certbot_dns_google._internal.dns_google:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_google',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -18,6 +20,20 @@ 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-dns-linode',
version=version,
@ -61,5 +77,7 @@ setup(
'dns-linode = certbot_dns_linode._internal.dns_linode:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_linode',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -20,6 +22,20 @@ 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-dns-luadns',
version=version,
@ -63,5 +79,7 @@ setup(
'dns-luadns = certbot_dns_luadns._internal.dns_luadns:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_luadns',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -20,6 +22,20 @@ 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-dns-nsone',
version=version,
@ -63,5 +79,7 @@ setup(
'dns-nsone = certbot_dns_nsone._internal.dns_nsone:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_nsone',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -20,6 +22,20 @@ 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-dns-ovh',
version=version,
@ -63,5 +79,7 @@ setup(
'dns-ovh = certbot_dns_ovh._internal.dns_ovh:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_ovh',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -20,6 +22,20 @@ 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-dns-rfc2136',
version=version,
@ -63,5 +79,7 @@ setup(
'dns-rfc2136 = certbot_dns_rfc2136._internal.dns_rfc2136:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_rfc2136',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,5 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -14,6 +16,20 @@ install_requires = [
'zope.interface',
]
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-dns-route53',
version=version,
@ -55,5 +71,7 @@ setup(
'certbot-route53:auth = certbot_dns_route53.authenticator:Authenticator'
],
},
tests_require=["pytest"],
test_suite='certbot_dns_route53',
cmdclass={"test": PyTest},
)

View file

@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
recursive-include tests *
global-exclude __pycache__
global-exclude *.py[cod]

View file

@ -1,6 +1,7 @@
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
import sys
version = '1.0.0.dev0'
@ -19,6 +20,20 @@ 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-dns-sakuracloud',
version=version,
@ -62,5 +77,7 @@ setup(
'dns-sakuracloud = certbot_dns_sakuracloud._internal.dns_sakuracloud:Authenticator',
],
},
tests_require=["pytest"],
test_suite='certbot_dns_sakuracloud',
cmdclass={"test": PyTest},
)