[Python-checkins] CVS: python/dist/src/Lib/test test_regex.py,1.6,1.7
Guido van Rossum
gvanrossum@users.sourceforge.net
Tue, 16 Jan 2001 19:12:03 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv26054
Modified Files:
test_regex.py
Log Message:
Use __name__ instead of "test_regex" as the module name in the
warnings.filterwarnings() call. This suppresses the warning when the
module is imported with its full name (test.test_regex) too.
Index: test_regex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_regex.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** test_regex.py 2000/12/23 22:08:27 1.6
--- test_regex.py 2001/01/17 03:12:01 1.7
***************
*** 2,6 ****
import warnings
warnings.filterwarnings("ignore", "the regex module is deprecated",
! DeprecationWarning, "test_regex")
import regex
from regex_syntax import *
--- 2,6 ----
import warnings
warnings.filterwarnings("ignore", "the regex module is deprecated",
! DeprecationWarning, __name__)
import regex
from regex_syntax import *