]> granicus.if.org Git - python/commitdiff
Use __name__ instead of "test_regex" as the module name in the
authorGuido van Rossum <guido@python.org>
Wed, 17 Jan 2001 03:12:01 +0000 (03:12 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 17 Jan 2001 03:12:01 +0000 (03:12 +0000)
warnings.filterwarnings() call.  This suppresses the warning when the
module is imported with its full name (test.test_regex) too.

Lib/test/test_regex.py

index b925a669382f47de5eea627e1f46727b03de4223..a32482152c1e31f318e212f15080c4265c984a94 100644 (file)
@@ -1,7 +1,7 @@
 from test_support import verbose
 import warnings
 warnings.filterwarnings("ignore", "the regex module is deprecated",
-                        DeprecationWarning, "test_regex")
+                        DeprecationWarning, __name__)
 import regex
 from regex_syntax import *