On Tue, Nov 2, 2010 at 12:57 AM, Guido van Rossum <guido at python.org> wrote: > It is also possible to write automated tests that flag likely missing > symbols in __all__ (as well as symbols in __all__ missing from the > module). These days, test___all__ checks that everything in __all__ exists in standard library modules. It is also possible for individual module tests to include a check that goes the other way along the lines of: def test_all_is_complete(): known_private = {"known", "unexported", "names"} expected_public = (k for k in mod.__dict__ if k not in known_private and not k.startswith("_")) self.assertEqual(set(mod.__all__), expected_public) Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4