Commit 33119922 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

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

parent 123b1023
......@@ -11,6 +11,7 @@ import shutil
import errno
import random
import transaction
import six
from glob import glob
......@@ -286,6 +287,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