From a715e3c38cfb26f568363433c7c8f104d05dc6ba Mon Sep 17 00:00:00 2001 From: jevans Date: Thu, 8 Jan 2015 19:46:42 -0500 Subject: [PATCH] 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 --- glymur/test/test_jp2box.py | 7 ++++++- setup.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/glymur/test/test_jp2box.py b/glymur/test/test_jp2box.py index e43eae6..f9e7c5c 100644 --- a/glymur/test/test_jp2box.py +++ b/glymur/test/test_jp2box.py @@ -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 diff --git a/setup.py b/setup.py index 1b1abbd..00566cd 100644 --- a/setup.py +++ b/setup.py @@ -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')