This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Unit03
Recipients Unit03, martin.panter, serhiy.storchaka
Date 2016-05-25.19:29:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464204568.53.0.291388416141.issue27112@psf.upfronthosting.co.za>
In-reply-to
Content
> * 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.
History
Date User Action Args
2016-05-25 19:29:28Unit03setrecipients: + Unit03, martin.panter, serhiy.storchaka
2016-05-25 19:29:28Unit03setmessageid: <1464204568.53.0.291388416141.issue27112@psf.upfronthosting.co.za>
2016-05-25 19:29:28Unit03linkissue27112 messages
2016-05-25 19:29:28Unit03create