summaryrefslogtreecommitdiff
path: root/Lib/test/test_doctest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r--Lib/test/test_doctest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index f7c399e526..aa92777efc 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -701,8 +701,12 @@ class TestDocTestFinder(unittest.TestCase):
finally:
support.forget(pkg_name)
sys.path.pop()
- assert doctest.DocTestFinder().find(mod) == []
+ include_empty_finder = doctest.DocTestFinder(exclude_empty=False)
+ exclude_empty_finder = doctest.DocTestFinder(exclude_empty=True)
+
+ self.assertEqual(len(include_empty_finder.find(mod)), 1)
+ self.assertEqual(len(exclude_empty_finder.find(mod)), 0)
def test_DocTestParser(): r"""
Unit tests for the `DocTestParser` class.