mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
20ab9e9c0a
commit
e69d3d7587
1 changed files with 1 additions and 1 deletions
|
@ -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 *
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue