summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-17 03:12:01 +0000
committerGuido van Rossum <guido@python.org>2001-01-17 03:12:01 +0000
commite0dc3bb38af2596192d0b9d6dec01f02f8328124 (patch)
tree1d605be932c8b9ee39f306d1010d1808b71e89d2 /Lib
parent2c8b27f7735d2aac1587cbf7334207ecf5a3e28e (diff)
downloadcpython-e0dc3bb38af2596192d0b9d6dec01f02f8328124.tar.gz
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_regex.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_regex.py b/Lib/test/test_regex.py
index b925a66938..a32482152c 100644
--- a/Lib/test/test_regex.py
+++ b/Lib/test/test_regex.py
@@ -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 *