From d75e7e43420273dc774bb39caa636c5c866fe935 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Mon, 15 Sep 2003 11:01:21 +0000 Subject: [PATCH] Explicitly define public symbols via __all__: see discussion with Raymond Hettinger in comments for issue 804115 https://sourceforge.net/tracker/?func=detail&atid=105470&aid=804115&group_id=5470 --- Lib/unittest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Lib/unittest.py b/Lib/unittest.py index d033936d2d..043b9a848a 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -55,6 +55,16 @@ import string import os import types +############################################################################## +# Exported classes and functions +############################################################################## +__all__ = ['TestResult', 'TestCase', 'TestSuite', 'TextTestRunner', + 'TestLoader', 'FunctionTestCase', 'main', 'defaultTestLoader'] + +# Expose obsolete functions for backwards compatability +__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) + + ############################################################################## # Test framework core ############################################################################## -- 2.50.1