Commit 862ad244 authored by Jim Fulton's avatar Jim Fulton

Tried to prevent errors generated by the logging package at exit.

I finally had to resort to os._exit, which I'm not happy about,
although I don't suppose it could do any harm for the test runner.

I wonder is a test is leaving something behind it shouldn't.

Also return the test result status as the exit status.
parent d0fdb5e3
...@@ -18,11 +18,11 @@ Test runner for ZODB. ...@@ -18,11 +18,11 @@ Test runner for ZODB.
See the docs for zope.testing; test.py is a small driver for See the docs for zope.testing; test.py is a small driver for
zope.testing.testrunner. zope.testing.testrunner.
""" """
import warnings
import sys
import os
from distutils.util import get_platform from distutils.util import get_platform
import logging
import os
import sys
import warnings
# If ``setup.py build_ext -i`` was used, we want to get code from src/. # If ``setup.py build_ext -i`` was used, we want to get code from src/.
# Else (``setup.py build``) we have to look in a funky platform-specific # Else (``setup.py build``) we have to look in a funky platform-specific
...@@ -62,4 +62,10 @@ defaults = [ ...@@ -62,4 +62,10 @@ defaults = [
"--path", path, "--path", path,
] ]
testrunner.run(defaults) result = testrunner.run(defaults)
# Try to avoid spurious error during exit. Some thing is trying to log
# something after the files used by the logger have been closed.
logging.disable(999999999)
import os
os._exit(result)
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