diff options
| author | Keichi Takahashi <keichi.t@me.com> | 2021-11-18 17:39:24 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-18 09:39:24 +0100 |
| commit | f9d81029d51321e91f2ff1468102d5554be50b45 (patch) | |
| tree | 361664c7a83b2b78b7bc29fe14be7844138f8556 /tests | |
| parent | 3e27d87ad2323b1f863b2fb4e52e9ac2b9ff31cf (diff) | |
| download | astroid-git-f9d81029d51321e91f2ff1468102d5554be50b45.tar.gz | |
Skip test_oserror if six is installed (#1254)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unittest_object_model.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unittest_object_model.py b/tests/unittest_object_model.py index 374d9202..bbcdd545 100644 --- a/tests/unittest_object_model.py +++ b/tests/unittest_object_model.py @@ -20,6 +20,13 @@ import astroid from astroid import builder, nodes, objects, test_utils, util from astroid.exceptions import InferenceError +try: + import six # pylint: disable=unused-import + + HAS_SIX = True +except ImportError: + HAS_SIX = False + class InstanceModelTest(unittest.TestCase): def test_instance_special_model(self) -> None: @@ -566,6 +573,7 @@ class ExceptionModelTest(unittest.TestCase): inferred = next(ast_node.infer()) assert isinstance(inferred, astroid.Const) + @unittest.skipIf(HAS_SIX, "This test fails if the six library is installed") def test_oserror(self) -> None: ast_nodes = builder.extract_node( """ |
