Jacek Kołodziej added the comment:

> * 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27112>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to