[Python-checkins] python/dist/src/Lib doctest.py,1.81,1.82

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Tue Aug 24 00:42:58 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6151/Lib

Modified Files:
	doctest.py 
Log Message:
The attempt to shut up deprecation warnings for doctest's own use of
is_private in its tests failed if doctest.py was run directly.  Now
it works.


Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- doctest.py	23 Aug 2004 22:13:21 -0000	1.81
+++ doctest.py	23 Aug 2004 22:42:55 -0000	1.82
@@ -220,6 +220,11 @@
 import warnings
 from StringIO import StringIO
 
+# Don't whine about the deprecated is_private function in this
+# module's tests.
+warnings.filterwarnings("ignore", "is_private", DeprecationWarning,
+                        __name__, 0)
+
 real_pdb_set_trace = pdb.set_trace
 
 # There are 4 basic classes:
@@ -287,8 +292,6 @@
     Return true iff base begins with an (at least one) underscore, but
     does not both begin and end with (at least) two underscores.
 
-    >>> warnings.filterwarnings("ignore", "is_private", DeprecationWarning,
-    ...                         "doctest", 0)
     >>> is_private("a.b", "my_func")
     False
     >>> is_private("____", "_my_func")



More information about the Python-checkins mailing list