seperate out docs test so it runs independently (not on every test)

This commit is contained in:
Lindsey Heagy
2016-01-31 12:08:29 -08:00
parent e314bdb740
commit f4ef767764
2 changed files with 22 additions and 6 deletions
+1 -6
View File
@@ -22,6 +22,7 @@ env:
- TEST_DIR=tests/examples
- TEST_DIR=tests/em/fdem/inverse/adjoint
- TEST_DIR=tests/em/fdem/forward
- TEST_DIR=tests/docs
# Setup anaconda
before_install:
@@ -45,12 +46,6 @@ install:
# Run test
script:
# test docs
- cd docs
- sphinx-build -nW -b html -d _build/doctrees . _build/html
- sphinx-build -nW -b latex -d _build/doctrees . _build/latex
- sphinx-build -nW -b linkcheck -d _build/doctrees . _build/linkcheck
- cd ../
- nosetests $TEST_DIR --with-cov --cov SimPEG --cov-config .coveragerc -v -s
+21
View File
@@ -0,0 +1,21 @@
import subprocess
import unittest
import os
class Doc_Test(unittest.TestCase):
def test_html(self,rmdir=True):
check = subprocess.call(["sphinx-build", "-nW", "-b", "html", "-d", "../../docs/_build/doctrees", "../../docs", "../../docs/_build/html"])
assert check == 0
def test_latex(self,rmdir=True):
check = subprocess.call(["sphinx-build", "-nW", "-b", "latex", "-d", "../../docs/_build/doctrees", "../../docs", "../../docs/_build/latex"])
assert check == 0
def test_linkcheck(self,rmdir=True):
check = subprocess.call(["sphinx-build", "-nW", "-b", "linkcheck", "-d", "../../docs/_build/doctrees", "../../docs", "../../docs/_build"])
assert check == 0
if __name__ == '__main__':
unittest.main()