Skip to content
Permalink
Browse files

Set up for doctesting stuff in www site (eg README)

  • Loading branch information...
bitprophet committed Jul 25, 2018
1 parent bdbae33 commit 44a4d31ab3163b3d9808a18d780561da9910bbe2
Showing with 11 additions and 11 deletions.
  1. +1 −1 .travis.yml
  2. +1 −9 sites/docs/conf.py
  3. +9 −1 sites/shared_conf.py
@@ -61,7 +61,7 @@ script:
# user...
- inv travis.sudo-run "inv integration --capture=no"
# Websites build OK? (Not on PyPy3, Sphinx is all "who the hell are you?" =/
- "if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then inv sites docs.doctest; fi"
- "if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then inv sites www.doctest docs.doctest; fi"
# Did we break setup.py?
- inv travis.test-installation --package=fabric --sanity="fab --version"
# Test distribution builds.
@@ -1,5 +1,5 @@
# Obtain shared config values
import os, sys
import sys
from os.path import abspath, join, dirname

sys.path.append(abspath(join(dirname(__file__), "..")))
@@ -10,14 +10,6 @@
extensions.append("sphinx.ext.autodoc")
autodoc_default_flags = ["members", "special-members"]

# Enable & configure doctest
extensions.append("sphinx.ext.doctest")
# Import mock tooling from unit tests' _util.py
doctest_path = [abspath(join(dirname(__file__), "..", "..", "tests"))]
doctest_global_setup = r"""
from _util import MockRemote, MockSFTP, Session, Command
"""

# Default is 'local' building, but reference the public WWW site when building
# under RTD.
target = join(dirname(__file__), "..", "www", "_build")
@@ -1,5 +1,5 @@
import os
from os.path import join, dirname
from os.path import join, dirname, abspath
from datetime import datetime

import alabaster
@@ -32,6 +32,14 @@
"**": ["about.html", "navigation.html", "searchbox.html", "donate.html"]
}

# Enable & configure doctest
extensions.append("sphinx.ext.doctest")
# Import mock tooling from unit tests' _util.py
doctest_path = [abspath(join(dirname(__file__), "..", "tests"))]
doctest_global_setup = r"""
from _util import MockRemote, MockSFTP, Session, Command
"""

on_rtd = os.environ.get("READTHEDOCS") == "True"
on_travis = os.environ.get("TRAVIS", False)
on_dev = not (on_rtd or on_travis)

0 comments on commit 44a4d31

Please sign in to comment.
You can’t perform that action at this time.