Skip to content

Commit

Permalink
Disabled Sphinx doctests on Python versions other than Python 2.7, as…
Browse files Browse the repository at this point in the history
… the doctests use unicode literals.
  • Loading branch information
runfalk committed Mar 21, 2017
1 parent 1d387bb commit 89913a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PYVER := $(shell python -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))')

build: test doc sdist wheel

clean: clean-pyc clean-build
Expand All @@ -18,7 +20,11 @@ doc:
make -C doc/ html

test:
ifeq ($(PYVER), 2.7)
make -C doc/ doctest
else
@echo "Skipping doctests as they only work on Python 2.7 due to unicode literals"
endif
pytest

sdist:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def rst_preprocess(file):
"codecov",
"pytest>=3.0",
"pytest-cov",
"Sphinx",
"sphinx-rtd-theme",
"Sphinx; python_version != '3.3'",
"sphinx-rtd-theme; python_version != '3.3'",
"twine",
],
},
Expand Down

0 comments on commit 89913a4

Please sign in to comment.