Skip to content

Commit 23f5120

Browse files
committed
tests: Skip readme renderer on py 3.9
Readme renderer uses html5lib, which does not work on Python 3.9. See discussion at: html5lib/html5lib-python#419
1 parent fc65b2f commit 23f5120

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/test_readme.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1+
import sys
12
from io import StringIO
23

34
try:
45
from pathlib import Path
56
except ImportError:
67
from pathlib2 import Path
7-
from readme_renderer.rst import render
88

9+
import pytest
10+
if sys.version_info < (3, 9):
11+
from readme_renderer.rst import render
12+
else:
13+
render = None
914

15+
16+
@pytest.mark.skipif(render is None, reason="html5lib issue #419")
1017
def test_pypi_rendering():
1118
# Adapted from `https://stackoverflow.com/questions/46766570/`.
1219
readme = Path("README.rst")

0 commit comments

Comments
 (0)