Skip to content

Commit

Permalink
Merge pull request #209 from python-greenlet/issue204
Browse files Browse the repository at this point in the history
Convert most documentation examples to doctests and run them on CI and tox
  • Loading branch information
jamadden committed Nov 13, 2020
2 parents 7ebdf9b + 64ef3d4 commit c53adf3
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 137 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ python:
- 3.8
- 3.9

install: pip install -U -e .[test]
install: pip install -U -e .[test,docs]

script: python -m unittest discover -v greenlet.tests
script:
- python -m unittest discover -v greenlet.tests
- sphinx-build -b doctest -d docs/_build/doctrees2 docs docs/_build/doctest2
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ install:
- "%CMD_IN_ENV% pip install --upgrade -r dev-requirements.txt"

build_script:
- "%CMD_IN_ENV% python -m pip install -U -e .[test]"
- "%CMD_IN_ENV% python -m pip install -U -e .[test,docs]"


test_script:
- "%CMD_IN_ENV% python -m unittest discover -v greenlet.tests"
- "%CMD_IN_ENV% python -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctest"

after_test:
- "%CMD_IN_ENV% python setup.py bdist_wheel"
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
exclude_patterns = ['_build']

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
default_role = "obj"

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
Expand Down

0 comments on commit c53adf3

Please sign in to comment.