mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-27 11:27:23 +08:00
seperate out docs test so it runs independently (not on every test)
This commit is contained in:
+1
-6
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user