Commit 4daeb035 authored by Jason Madden's avatar Jason Madden

coverage for ssl.py

parent e5a0ea56
...@@ -12,13 +12,13 @@ if PY2: ...@@ -12,13 +12,13 @@ if PY2:
# don't pollute the namespace # don't pollute the namespace
from gevent import _sslgte279 as _source from gevent import _sslgte279 as _source
else: else:
from gevent import _ssl2 as _source from gevent import _ssl2 as _source # pragma: no cover
else: else:
# Py3 # Py3
from gevent import _ssl3 as _source from gevent import _ssl3 as _source # pragma: no cover
for key in _source.__dict__: for key in _source.__dict__:
if key.startswith('__') and key not in '__implements__ __all__ __imports__'.split(): if key.startswith('__') and key not in ('__implements__', '__all__', ' __imports__'):
continue continue
globals()[key] = getattr(_source, key) globals()[key] = getattr(_source, key)
...@@ -279,7 +279,9 @@ def main(): ...@@ -279,7 +279,9 @@ def main():
print("Enabling coverage to", os.environ['COVERAGE_FILE']) print("Enabling coverage to", os.environ['COVERAGE_FILE'])
if options.config: if options.config:
config = {} config = {}
six.exec_(open(options.config).read(), config) with open(options.config) as f:
config_data = f.read()
six.exec_(config_data, config)
FAILING_TESTS = config['FAILING_TESTS'] FAILING_TESTS = config['FAILING_TESTS']
tests = discover(args, options.ignore, coverage) tests = discover(args, options.ignore, coverage)
if options.discover: if options.discover:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment