summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-17 03:12:01 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-17 03:12:01 (GMT)
commite69d3d75874004db90718d535b9f97d27844f7c5 (patch)
tree59954c573d175f84cbb96028e9904256e2f18112
parent20ab9e9c0ac4e9a3081aa0400a46c0d3bacd30f5 (diff)
downloadcpython-e69d3d75874004db90718d535b9f97d27844f7c5.zip
cpython-e69d3d75874004db90718d535b9f97d27844f7c5.tar.gz
cpython-e69d3d75874004db90718d535b9f97d27844f7c5.tar.bz2
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.
-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 b925a66..a324821 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 *