summaryrefslogtreecommitdiff
path: root/tests/unittest_builder.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-11-26 17:08:38 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2019-11-26 17:08:38 +0100
commit3fd48b32fd3db219c9abe9a668f9e41ee673c206 (patch)
treeb4d7de94353252c11e368454628505f119dd88a5 /tests/unittest_builder.py
parent2cb6818ad5db25fd0f32a193ab90425e7dfcbee0 (diff)
downloadastroid-git-3fd48b32fd3db219c9abe9a668f9e41ee673c206.tar.gz
Disable test on Python 3.8+ where the builtin ast does not have a specific error
Diffstat (limited to 'tests/unittest_builder.py')
-rw-r--r--tests/unittest_builder.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unittest_builder.py b/tests/unittest_builder.py
index 75557761..9ea597c8 100644
--- a/tests/unittest_builder.py
+++ b/tests/unittest_builder.py
@@ -22,6 +22,7 @@ import socket
import sys
import unittest
+import pytest
from astroid import builder
from astroid import exceptions
from astroid import manager
@@ -692,6 +693,13 @@ def test_module_build_dunder_file():
assert module.path[0] == collections.__file__
+@pytest.mark.skipif(
+ sys.version_info[:2] >= (3, 8),
+ reason=(
+ "The builtin ast module does not fail with a specific error "
+ "for syntax error caused by invalid type comments."
+ ),
+)
def test_parse_module_with_invalid_type_comments_does_not_crash():
node = builder.parse(
"""