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:
Guido van Rossum 2001-01-17 03:12:01 +00:00
parent 20ab9e9c0a
commit e69d3d7587

View File

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