diff options
-rw-r--r-- | meta/lib/oeqa/core/loader.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py index 229f094b38..80e3d2800c 100644 --- a/meta/lib/oeqa/core/loader.py +++ b/meta/lib/oeqa/core/loader.py | |||
@@ -12,15 +12,19 @@ from oeqa.core.case import OETestCase | |||
12 | from oeqa.core.decorator import decoratorClasses, OETestDecorator, \ | 12 | from oeqa.core.decorator import decoratorClasses, OETestDecorator, \ |
13 | OETestFilter, OETestDiscover | 13 | OETestFilter, OETestDiscover |
14 | 14 | ||
15 | def _make_failed_test(classname, methodname, exception, suiteClass): | 15 | if sys.version_info >= (3,4,4): |
16 | """ | 16 | def _make_failed_test(classname, methodname, exception, suiteClass): |
17 | When loading tests, the unittest framework stores any exceptions and | 17 | """ |
18 | displays them only when the 'run' method is called. | 18 | When loading tests, the unittest framework stores any exceptions and |
19 | 19 | displays them only when the 'run' method is called. | |
20 | For our purposes, it is better to raise the exceptions in the loading | 20 | |
21 | step rather than waiting to run the test suite. | 21 | For our purposes, it is better to raise the exceptions in the loading |
22 | """ | 22 | step rather than waiting to run the test suite. |
23 | raise exception | 23 | """ |
24 | raise exception | ||
25 | else: | ||
26 | def _make_failed_test(classname, exception, suiteClass): | ||
27 | raise exception | ||
24 | unittest.loader._make_failed_test = _make_failed_test | 28 | unittest.loader._make_failed_test = _make_failed_test |
25 | 29 | ||
26 | def _find_duplicated_modules(suite, directory): | 30 | def _find_duplicated_modules(suite, directory): |