Skip numpydoc tests for Python 2

This commit is contained in:
Dave Halter
2019-07-22 00:49:35 +02:00
parent 13dd173664
commit 18eb7622ba

View File

@@ -6,6 +6,7 @@ from textwrap import dedent
import jedi
import pytest
from ..helpers import unittest
import sys
try:
import numpydoc # NOQA
@@ -21,6 +22,11 @@ except ImportError:
else:
numpy_unavailable = False
if sys.version_info.major == 2:
# In Python 2 there's an issue with tox/docutils that makes the tests fail,
# Python 2 is soon end-of-life, so just don't support numpydoc for it anymore.
numpydoc_unavailable = True
def test_function_doc(Script):
defs = Script("""