Message266390
> * All names in black list are implementation details. Names in white list are stable and already repeated in docs.
Assumption here is that implementation details shouldn't "look" public - they should have names starting with "_"; I think blacklisting names in these tests encourages good practice - if something "looks" public, either:
* it should be documented and placed in __all__
* renamed to something that doesn't look public anymore
* in some special cases - be explicitely blacklisted in test.
But ok, assuming we go with whitelisting and plain self.assertCountEqual:
> * White list consists mostly from token.__all__.
Should I then do:
import token
expected = token.__all__ + ["COMMENT", "NL", "ENCODING", "TokenInfo", "TokenError", "detect_encoding", "untokenize", "open", "tokenize"]
?
> IMO changing all the names adds too much churn with minimal benefit.
I wouldn't call it minimal, it has some positive impact on readability, see last line from The Zen of Python. :) Of course, final call is yours.
Single import of unittest is such a small change I would rather keep it.
I fully agree existing TestMisc class is a good place for this test, though. |
|
Date |
User |
Action |
Args |
2016-05-25 19:29:28 | Unit03 | set | recipients:
+ Unit03, martin.panter, serhiy.storchaka |
2016-05-25 19:29:28 | Unit03 | set | messageid: <1464204568.53.0.291388416141.issue27112@psf.upfronthosting.co.za> |
2016-05-25 19:29:28 | Unit03 | link | issue27112 messages |
2016-05-25 19:29:28 | Unit03 | create | |
|