30 | | I found this problem while trying to run our test suite on Python 3. Unittest framework does an obvious {{{if isinstance(obj, type) and issubclass(obj, case.TestCase):}}} check when collecting the test suite (see https://github.com/python/cpython/blob/v3.5.7/Lib/unittest/loader.py#L122), so when we have a module-level {{{SimpleLazyObject}}} (obviously it wraps a different function than the one I've given here, but also a failing) it gets unexpectedly evaluated and raises an exception, which prevents us from even gathering the tests on Python 3. |
| 30 | I found this problem while trying to run our test suite on Python 3. Unittest framework does an obvious {{{if isinstance(obj, type) and issubclass(obj, case.TestCase):}}} check when collecting the test suite (see https://github.com/python/cpython/blob/v3.5.7/Lib/unittest/loader.py#L122), so when we have a module-level {{{SimpleLazyObject}}} (obviously it wraps a different function than the one I've given here, but also a failing one) it gets unexpectedly evaluated and raises an exception, which prevents us from even gathering the tests on Python 3. |