Skip to content

Commit 40ac1ed

Browse files
committed
testing sphinx stuff
1 parent f4ff78d commit 40ac1ed

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ before_install:
2626
install:
2727
# this line needs to be updated to match the requirements.txt files
2828
# the conda installer isn't able to process PIP's requirements.txt files
29-
- conda install --yes python=${TRAVIS_PYTHON_VERSION} numpy future scipy matplotlib nose sphinx
29+
- conda install --yes python=${TRAVIS_PYTHON_VERSION} numpy future scipy matplotlib nose sphinx pep8 coverage
3030
- conda list
3131
- pip install --user travis-sphinx
3232

3333
script:
3434
# - which nosetests
3535
# - nosetests tests -v --with-id
3636
- ./docs/update_apidocs.sh
37-
- travis-sphinx -n build
37+
- which nosetests
38+
- nosetests tests -v --with-id --with-coverage --cover-package=pySDC --cover-html --cover-html-dir=docs/build/test_coverage
39+
- travis-sphinx --branches=pySDC_v2,master --outdir=docs/build build
3840

3941
after_success:
4042
- travis-sphinx deploy

docs/source/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ esp. the multilevel extension MLSDC. It is intended for rapid prototyping and ed
1111
sweepers or predictors can be tested and first toy problems can be easily implemented. Two virtually parallel PFASST
1212
iterators are implemented as well, giving full access to all values at any time.
1313

14+
See `test coverage results <test_coverage/index.html>`_
15+
16+
.. literalinclude:: ../../output.txt
17+
1418
Contents:
1519

1620
.. toctree::

docs/update_apidocs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ SPHINX_APIDOC="`which sphinx-apidoc`"
1616

1717
echo "removing existing .rst files ..."
1818
rm ${PWD}/docs/source/pySDC/*.rst
19-
#rm ${PWD}/docs/source/implementations/*.rst
19+
rm -r ${PWD}/docs/build
2020

2121
echo ""
2222
echo "generating new .rst files ..."
2323
${SPHINX_APIDOC} -o docs/source/pySDC pySDC --force
24-
#${SPHINX_APIDOC} -o docs/source/implementations implementations --force
24+

tests/test_collocation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ class TestCollocation:
1616
# Check that the quadrature rule integrates polynomials up to order p-1 exactly
1717
# -----------------------------------------------------------------------------
1818
def test_1(self):
19+
f = open('output.txt', 'w')
1920
for type in classes:
2021
for M in range(type[1],type[2]+1):
2122
coll = getattr(pySDC.CollocationClasses, type[0])(M, t_start, t_end)
22-
23+
2324
# some basic consistency tests
2425
assert np.size(coll.nodes)==np.size(coll.weights), "For node type " + type[0] + ", number of entries in nodes and weights is different"
2526
assert np.size(coll.nodes)==M, "For node type " + type[0] + ", requesting M nodes did not produce M entries in nodes and weights"
@@ -36,6 +37,9 @@ def test_1(self):
3637
int_coll = coll.evaluate(coll.weights, poly_vals)
3738
# For large values of M, substantial differences from different round of error have to be considered
3839
assert abs(int_ex - int_coll) < 1e-10, "For node type " + type[0] + ", failed to integrate polynomial of degree " + str(coll.order-1) + " exactly. Error: %5.3e" % abs(int_ex - int_coll)
40+
f.write("For node type " + type[0] + ", failed to integrate polynomial of degree " + str(
41+
coll.order - 1) + " exactly. Error: %5.3e\n" % abs(int_ex - int_coll))
42+
f.close()
3943

4044

4145
# TEST 2:

0 commit comments

Comments
 (0)