Commit e6646870 authored by Tim Peters's avatar Tim Peters

Suppress the warning message about "Couldn't import the

ExtensionClass-based base class ..." from Persistence/__init__.py.  It's
bad to see that when running tests.

This was fixed quite a while ago in ZODB 3.3, but the code appeared to
get lost in the latest round of merges.  By eyeball, I didn't detect any
other lossage in test.py.
parent 3d5fcac6
...@@ -655,6 +655,8 @@ def main(module_filter, test_filter, libdir): ...@@ -655,6 +655,8 @@ def main(module_filter, test_filter, libdir):
def process_args(argv=None): def process_args(argv=None):
import getopt import getopt
import warnings
global module_filter global module_filter
global test_filter global test_filter
global VERBOSE global VERBOSE
...@@ -676,6 +678,20 @@ def process_args(argv=None): ...@@ -676,6 +678,20 @@ def process_args(argv=None):
global functional global functional
global test_dir global test_dir
# Persistence/__init__.py generates a long warning message about the
# the failure of
# from _Persistence import Persistent
# for the benefit of people expecting that to work from previous (pre 3.3)
# ZODB3 releases. We don't need to see that msg every time we run the
# test suite, though, and it's positively unhelpful to see it in this
# context.
# NOTE: "(?s)" enables re.SINGLELINE, so that the ".*" can suck up
# newlines.
warnings.filterwarnings("ignore",
message="(?s)Couldn't import the ExtensionClass-based base class.*"
"There are two possibilities:",
category=UserWarning)
if argv is None: if argv is None:
argv = sys.argv argv = sys.argv
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment