Commits

ianjosephwilson  committed c90ba17

Consolidate imports in test_doctests.

  • Participants
  • Parent commits 42b47d3

Comments (0)

Files changed (1)

File tests/test_doctests.py

 import os
 import sys
+try:
+    import doctest
+    doctest.OutputChecker
+except (AttributeError, ImportError): # Python < 2.4
+    import util.doctest24 as doctest
 
 from formencode import compound
 from formencode import htmlfill
 " Used to resolve text files to absolute paths. """
 
 
-try:
-    import doctest
-    doctest.OutputChecker
-except (AttributeError, ImportError): # Python < 2.4
-    import util.doctest24 as doctest
-
-
 def doctest_file(document, verbose, raise_error):
     (failure_count, test_count) = doctest.testfile(document,
             module_relative=False, optionflags=doctest.ELLIPSIS,