mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-36406: Handle namespace packages in doctest (GH-12520)
This commit is contained in:
parent
025a602af7
commit
8289e27393
3 changed files with 8 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue