From 48c21a902e2bd91e2d60d2e2082a0800efee1987 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Fri, 6 Mar 2020 14:45:09 +0100 Subject: [PATCH] [tests/module] Skip failing tests in Python 3.{4,5} --- tests/core/test_module.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/core/test_module.py b/tests/core/test_module.py index 5458ea3..56c2da0 100644 --- a/tests/core/test_module.py +++ b/tests/core/test_module.py @@ -1,5 +1,6 @@ import unittest +import sys import shlex import core.module @@ -26,6 +27,7 @@ class module(unittest.TestCase): self.assertEqual('core.module', module.__class__.__module__, 'module must be a module object') self.assertEqual('Error', module.__class__.__name__, 'an invalid module must be a core.module.Error') + @unittest.skipIf(sys.version_info.major == 3 and sys.version_info.minor in [ 4, 5 ], 'importlib error reporting in Python 3.{4,5} different') def test_importerror(self): with unittest.mock.patch('core.module.importlib') as importlib: importlib.import_module.side_effect = ImportError('some-error')