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

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

parent 28d8589c
...@@ -11,6 +11,7 @@ import shutil ...@@ -11,6 +11,7 @@ import shutil
import errno import errno
import random import random
import transaction import transaction
import six
from glob import glob from glob import glob
...@@ -286,6 +287,15 @@ class ERP5TypeTestLoader(unittest.TestLoader): ...@@ -286,6 +287,15 @@ class ERP5TypeTestLoader(unittest.TestLoader):
lambda self: self._testMethodPrefix, lambda self: self._testMethodPrefix,
lambda self, value: None) 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): def _importZodbTestComponent(self, name):
import erp5.component.test import erp5.component.test
module = __import__('erp5.component.test.' + name, 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