Skip to content

Commit 643c20c

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 4c83fc9 commit 643c20c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_readme.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
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
910

11+
if sys.version_info < (3, 9):
12+
from readme_renderer.rst import render
13+
else:
14+
render = None
15+
16+
17+
@pytest.mark.skipif(render is None, reason="html5lib issue #419")
1018
def test_pypi_rendering():
1119
# Adapted from `https://stackoverflow.com/questions/46766570/`.
1220
readme = Path("README.rst")

0 commit comments

Comments
 (0)