8000 bpo-36406: Handle namespace packages in doctest by tirkarthi · Pull Request #12520 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36406: Handle namespace packages in doctest #12520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations 8000
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change empty to namespace.
  • Loading branch information
tirkarthi committed Sep 11, 2019
commit f0ef6f23250a07edfa86aa916e8965027f3e5cfb
2 changes: 1 addition & 1 deletion Lib/doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ def _get_test(self, obj, name, module, globs, source_lines):
if module is None:
filename = None
else:
# __file__ can be None for empty packages.
# __file__ can be None for namespace packages.
filename = getattr(module, '__file__', None) or module.__name__
if filename[-4:] == ".pyc":
filename = filename[:-1]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Handle empty packages in :mod:`doctest`. Patch by Karthikeyan Singaravelan.
Handle namespace packages in :mod:`doctest`. Patch by Karthikeyan Singaravelan.
0