diff -ru --exclude='*.pyc' --exclude='*.so' --exclude=lxml-version.h lxml-1.1.2/src/lxml/tests/test_etree.py lxml/src/lxml/tests/test_etree.py
--- lxml-1.1.2/src/lxml/tests/test_etree.py	2006-10-30 09:48:02.000000000 -0500
+++ lxml/src/lxml/tests/test_etree.py	2006-11-25 11:31:15.000000000 -0500
@@ -8,7 +8,12 @@
 """
 
 
-import unittest, doctest, copy, sys
+import unittest, copy, sys
+
+try:
+    from doctest import DocFileSuite
+except ImportError:
+    from lxml.bbb.doctest import DocFileSuite
 
 from common_imports import etree, StringIO, HelperTestCase, fileInTestDir
 from common_imports import SillyFileLike, canonicalize
@@ -1260,9 +1265,9 @@
     suite.addTests([unittest.makeSuite(ETreeXIncludeTestCase)])
     suite.addTests([unittest.makeSuite(ETreeC14NTestCase)])
     suite.addTests(
-        [doctest.DocFileSuite('../../../doc/api.txt')])
+        [DocFileSuite('../../../doc/api.txt')])
     suite.addTests(
-        [doctest.DocFileSuite('../../../doc/resolvers.txt')])
+        [DocFileSuite('../../../doc/resolvers.txt')])
     return suite
 
 if __name__ == '__main__':
diff -ru --exclude='*.pyc' --exclude='*.so' --exclude=lxml-version.h lxml-1.1.2/src/lxml/tests/test_nsclasses.py lxml/src/lxml/tests/test_nsclasses.py
--- lxml-1.1.2/src/lxml/tests/test_nsclasses.py	2006-09-13 12:18:36.000000000 -0400
+++ lxml/src/lxml/tests/test_nsclasses.py	2006-11-25 11:32:48.000000000 -0500
@@ -5,7 +5,16 @@
 namespace registry mechanism
 """
 
-import unittest, doctest
+import unittest
+
+try:
+    from doctest import DocFileSuite
+    from doctest import NORMALIZE_WHITESPACE
+    from doctest import ELLIPSIS
+except ImportError:
+    from lxml.bbb.doctest import DocFileSuite
+    from lxml.bbb.doctest import NORMALIZE_WHITESPACE
+    from lxml.bbb.doctest import ELLIPSIS
 
 from common_imports import etree, HelperTestCase
 
@@ -156,9 +165,9 @@
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTests([unittest.makeSuite(ETreeNamespaceClassesTestCase)])
-    optionflags = doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS
+    optionflags = NORMALIZE_WHITESPACE|ELLIPSIS
     suite.addTests(
-        [doctest.DocFileSuite('../../../doc/element_classes.txt',
+        [DocFileSuite('../../../doc/element_classes.txt',
                               optionflags=optionflags)],
         )
     return suite
diff -ru --exclude='*.pyc' --exclude='*.so' --exclude=lxml-version.h lxml-1.1.2/src/lxml/tests/test_objectify.py lxml/src/lxml/tests/test_objectify.py
--- lxml-1.1.2/src/lxml/tests/test_objectify.py	2006-09-23 01:59:22.000000000 -0400
+++ lxml/src/lxml/tests/test_objectify.py	2006-11-25 11:33:57.000000000 -0500
@@ -8,7 +8,12 @@
 """
 
 
-import unittest, doctest, operator
+import unittest, operator
+
+try:
+    from doctest import DocFileSuite
+except ImportError:
+    from lxml.bbb.doctest import DocFileSuite
 
 from common_imports import etree, StringIO, HelperTestCase, fileInTestDir
 from common_imports import SillyFileLike, canonicalize
@@ -847,7 +852,7 @@
     suite = unittest.TestSuite()
     suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
     suite.addTests(
-        [doctest.DocFileSuite('../../../doc/objectify.txt')])
+        [DocFileSuite('../../../doc/objectify.txt')])
     return suite
 
 if __name__ == '__main__':
diff -ru --exclude='*.pyc' --exclude='*.so' --exclude=lxml-version.h lxml-1.1.2/src/lxml/tests/test_sax.py lxml/src/lxml/tests/test_sax.py
--- lxml-1.1.2/src/lxml/tests/test_sax.py	2006-09-13 12:18:36.000000000 -0400
+++ lxml/src/lxml/tests/test_sax.py	2006-11-25 11:37:10.000000000 -0500
@@ -4,13 +4,18 @@
 Test cases related to SAX I/O
 """
 
-import unittest, doctest
+import unittest
 from StringIO import StringIO
 
 from common_imports import HelperTestCase
 from lxml import sax
 from xml.dom import pulldom
 
+try:
+    from doctest import DocFileSuite
+except ImportError:
+    from lxml.bbb.doctest import DocFileSuite
+
 class ETreeSaxTestCase(HelperTestCase):
 
     def test_etree_sax_simple(self):
@@ -194,7 +199,7 @@
     suite = unittest.TestSuite()
     suite.addTests([unittest.makeSuite(ETreeSaxTestCase)])
     suite.addTests(
-        [doctest.DocFileSuite('../../../doc/sax.txt')])
+        [DocFileSuite('../../../doc/sax.txt')])
     return suite
 
 if __name__ == '__main__':
diff -ru --exclude='*.pyc' --exclude='*.so' --exclude=lxml-version.h lxml-1.1.2/src/lxml/tests/test_xslt.py lxml/src/lxml/tests/test_xslt.py
--- lxml-1.1.2/src/lxml/tests/test_xslt.py	2006-10-30 04:47:09.000000000 -0500
+++ lxml/src/lxml/tests/test_xslt.py	2006-11-25 11:37:44.000000000 -0500
@@ -4,7 +4,12 @@
 Test cases related to XSLT processing
 """
 
-import unittest, doctest
+import unittest
+
+try:
+    from doctest import DocFileSuite
+except ImportError:
+    from lxml.bbb.doctest import DocFileSuite
 
 from common_imports import etree, StringIO, HelperTestCase, fileInTestDir
 
@@ -885,7 +890,7 @@
     suite = unittest.TestSuite()
     suite.addTests([unittest.makeSuite(ETreeXSLTTestCase)])
     suite.addTests(
-        [doctest.DocFileSuite('../../../doc/extensions.txt')])
+        [DocFileSuite('../../../doc/extensions.txt')])
     return suite
 
 if __name__ == '__main__':
