doctest needed a teardown fixture, pep8 work

this was the real fix for #316, not sure why this did not show up when
testing on linux mint
This commit is contained in:
jevans 2015-01-08 19:46:42 -05:00
commit a715e3c38c
2 changed files with 7 additions and 1 deletions

View file

@ -27,12 +27,17 @@ from .fixtures import (WARNING_INFRASTRUCTURE_ISSUE,
WINDOWS_TMP_FILE_MSG, MetadataBase)
def docTearDown(doctest_obj):
glymur.set_parseoptions(full_codestream=False)
def load_tests(loader, tests, ignore):
"""Run doc tests as well."""
if os.name == "nt":
# Can't do it on windows, temporary file issue.
return tests
tests.addTests(doctest.DocTestSuite('glymur.jp2box'))
tests.addTests(doctest.DocTestSuite('glymur.jp2box',
tearDown=docTearDown))
return tests

View file

@ -21,6 +21,7 @@ kwargs = {'name': 'Glymur',
'test_suite': 'glymur.test'}
install_requires = ['numpy>=1.7.0', 'lxml>=3.0.0']
test_requires = []
if sys.hexversion < 0x03030000:
install_requires.append('contextlib2>=0.4')
test_requires.append('mock>=1.0.1')