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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use period at end of comment.
Co-Authored-By: Brett Cannon <54418+brettcannon@users.noreply.github.com>
  • Loading branch information
tirkarthi and brettcannon authored May 30, 2019
commit d6bf090e16d3cee9ab44056215189e3c46fbd42a
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 empty packages.
filename = getattr(module, '__file__', None) or module.__name__
if filename[-4:] == ".pyc":
filename = filename[:-1]
Expand Down
0