Commit e03c3fc0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

py3: override ERP5TypeTestLoader.__init__ to avoid RecursionError in Python 3.

parent 8257ac4b
......@@ -11,6 +11,7 @@ import shutil
import errno
import random
import transaction
import six
from glob import glob
try:
from coverage import coverage
......@@ -291,6 +292,15 @@ class ERP5TypeTestLoader(unittest.TestLoader):
lambda self: self._testMethodPrefix,
lambda self, value: None)
if six.PY3:
def __init__(self):
# override without call super() to avoid RecursionError in Python 3.
# super().__init__()
self.errors = []
# Tracks packages which we have called into via load_tests, to
# avoid infinite re-entrancy.
self._loading_packages = set()
def _importZodbTestComponent(self, name):
import erp5.component.test
module = __import__('erp5.component.test.' + name,
......
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