mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 16:12:09 +02:00
@@ -17,6 +17,7 @@ env:
|
|||||||
- GOPATH=/tmp/go
|
- GOPATH=/tmp/go
|
||||||
- PATH=$GOPATH/bin:$PATH
|
- PATH=$GOPATH/bin:$PATH
|
||||||
matrix:
|
matrix:
|
||||||
|
- TOXENV=py26 BOULDER_INTEGRATION=1
|
||||||
- TOXENV=py27 BOULDER_INTEGRATION=1
|
- TOXENV=py27 BOULDER_INTEGRATION=1
|
||||||
- TOXENV=lint
|
- TOXENV=lint
|
||||||
- TOXENV=cover
|
- TOXENV=cover
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ setup(
|
|||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 2',
|
'Programming Language :: Python :: 2',
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 2.7',
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Programming Language :: Python :: 3.3',
|
||||||
|
'Programming Language :: Python :: 3.4',
|
||||||
'Topic :: Internet :: WWW/HTTP',
|
'Topic :: Internet :: WWW/HTTP',
|
||||||
'Topic :: Security',
|
'Topic :: Security',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -17,7 +17,12 @@ class StreamHandler(logging.StreamHandler):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, stream=None):
|
def __init__(self, stream=None):
|
||||||
super(StreamHandler, self).__init__(stream)
|
if sys.version_info < (2, 7):
|
||||||
|
# pragma: no cover
|
||||||
|
# pylint: disable=non-parent-init-called
|
||||||
|
logging.StreamHandler.__init__(self, stream)
|
||||||
|
else:
|
||||||
|
super(StreamHandler, self).__init__(stream)
|
||||||
self.colored = (sys.stderr.isatty() if stream is None else
|
self.colored = (sys.stderr.isatty() if stream is None else
|
||||||
stream.isatty())
|
stream.isatty())
|
||||||
self.red_level = logging.WARNING
|
self.red_level = logging.WARNING
|
||||||
@@ -31,10 +36,10 @@ class StreamHandler(logging.StreamHandler):
|
|||||||
:rtype: str
|
:rtype: str
|
||||||
|
|
||||||
"""
|
"""
|
||||||
output = super(StreamHandler, self).format(record)
|
out = (logging.StreamHandler.format(self, record)
|
||||||
|
if sys.version_info < (2, 7)
|
||||||
|
else super(StreamHandler, self).format(record))
|
||||||
if self.colored and record.levelno >= self.red_level:
|
if self.colored and record.levelno >= self.red_level:
|
||||||
return ''.join((le_util.ANSI_SGR_RED,
|
return ''.join((le_util.ANSI_SGR_RED, out, le_util.ANSI_SGR_RESET))
|
||||||
output,
|
|
||||||
le_util.ANSI_SGR_RESET))
|
|
||||||
else:
|
else:
|
||||||
return output
|
return out
|
||||||
|
|||||||
@@ -228,9 +228,8 @@ class CertLoaderTest(unittest.TestCase):
|
|||||||
def test_load_invalid_cert(self):
|
def test_load_invalid_cert(self):
|
||||||
from letsencrypt.crypto_util import pyopenssl_load_certificate
|
from letsencrypt.crypto_util import pyopenssl_load_certificate
|
||||||
bad_cert_data = CERT.replace("BEGIN CERTIFICATE", "ASDFASDFASDF!!!")
|
bad_cert_data = CERT.replace("BEGIN CERTIFICATE", "ASDFASDFASDF!!!")
|
||||||
|
self.assertRaises(
|
||||||
with self.assertRaises(errors.Error):
|
errors.Error, pyopenssl_load_certificate, bad_cert_data)
|
||||||
pyopenssl_load_certificate(bad_cert_data)
|
|
||||||
|
|
||||||
|
|
||||||
class NotBeforeTest(unittest.TestCase):
|
class NotBeforeTest(unittest.TestCase):
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ setup(
|
|||||||
'Operating System :: POSIX :: Linux',
|
'Operating System :: POSIX :: Linux',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 2',
|
'Programming Language :: Python :: 2',
|
||||||
|
'Programming Language :: Python :: 2.6',
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 2.7',
|
||||||
'Topic :: Internet :: WWW/HTTP',
|
'Topic :: Internet :: WWW/HTTP',
|
||||||
'Topic :: Security',
|
'Topic :: Security',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# acme and letsencrypt are not yet on pypi, so when Tox invokes
|
# acme and letsencrypt are not yet on pypi, so when Tox invokes
|
||||||
# "install *.zip", it will not find deps
|
# "install *.zip", it will not find deps
|
||||||
skipsdist = true
|
skipsdist = true
|
||||||
envlist = py27,cover,lint
|
envlist = py26,py27,py33,py34,cover,lint
|
||||||
|
|
||||||
# nosetest -v => more verbose output, allows to detect busy waiting
|
# nosetest -v => more verbose output, allows to detect busy waiting
|
||||||
# loops, especially on Travis
|
# loops, especially on Travis
|
||||||
@@ -48,6 +48,7 @@ commands =
|
|||||||
./tox.cover.sh
|
./tox.cover.sh
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
|
# recent versions of pylint do not support Python 2.6 (#97, #187)
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
# separating into multiple invocations disables cross package
|
# separating into multiple invocations disables cross package
|
||||||
# duplicate code checking; if one of the commands fails, others will
|
# duplicate code checking; if one of the commands fails, others will
|
||||||
|
|||||||
Reference in New Issue
Block a user