Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

#23882: unittest discovery doesn't detect namespace packages when given no parameters

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 1 month ago by f.apolloner
Modified:
4 years, 9 months ago
Reviewers:
robertc
CC:
rbcollins, ezio.melotti, Michael Foord, rgammans_gammascience.co.uk, Claudiu.Popa, zbynek.winkler_gmail.com, eric.snow, pconnell, Florian.Apolloner, ashkop
Visibility:
Public.

Patch Set 1 #

Total comments: 1

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/unittest/loader.py View 1 2 chunks +2 lines, -2 lines 0 comments Download
Lib/unittest/test/test_program.py View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 1
rbcollins
4 years, 9 months ago #1
I'd like to also see an explicit test for namespaces added.

http://bugs.python.org/review/23882/diff/14747/Lib/unittest/loader.py
File Lib/unittest/loader.py (right):

http://bugs.python.org/review/23882/diff/14747/Lib/unittest/loader.py#newcode129
Lib/unittest/loader.py:129: # load_tests may call loader.discover which changes
self._top_level_dir
its not permitted to do that actually - since the top level dir is related to
the import machinery. So, I think that a better way to make this safe is to make
_top_level_dir write-once.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+