From d1f962a18bd3ef81f352d6c70d775469c58b659e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carles=20Barrob=C3=A9s?= Date: Sun, 9 Feb 2014 00:17:40 +0100 Subject: [PATCH] Update docs to not keep track of example test output --- doc-requirements.txt | 1 + docs/conf.py | 2 ++ docs/example.rst | 28 +++++----------------------- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/doc-requirements.txt b/doc-requirements.txt index 2806c16..40a311e 100644 --- a/doc-requirements.txt +++ b/doc-requirements.txt @@ -1 +1,2 @@ Sphinx +sphinxcontrib-programoutput diff --git a/docs/conf.py b/docs/conf.py index 3bb2d6f..f64c504 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,6 +31,8 @@ sys.path.insert(0, os.path.split(docs_root)[0]) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc'] +if not on_rtd: + extensions.append('sphinxcontrib.programoutput') # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/example.rst b/docs/example.rst index 2fc7ad8..00bd4d8 100644 --- a/docs/example.rst +++ b/docs/example.rst @@ -22,30 +22,12 @@ and ``test_data_list.json``: .. literalinclude:: ../test/test_data_list.json :language: javascript -And then run them with:: +And then run them with your favourite test runner, e.g. if you use nose:: $ nosetests -v test/test_example.py - test_file_data_dict_sorted_list (test.test_example.FooTestCase) ... ok - test_file_data_dict_unsorted_list (test.test_example.FooTestCase) ... ok - test_file_data_list_Goodbye (test.test_example.FooTestCase) ... ok - test_file_data_list_Hello (test.test_example.FooTestCase) ... ok - test_greater_test_10_greater_than_5 (test.test_example.FooTestCase) ... ok - test_greater_test_2_greater_than_1 (test.test_example.FooTestCase) ... ok - test_larger_than_two_12 (test.test_example.FooTestCase) ... ok - test_larger_than_two_23 (test.test_example.FooTestCase) ... ok - test_larger_than_two_3 (test.test_example.FooTestCase) ... ok - test_larger_than_two_4 (test.test_example.FooTestCase) ... ok - test_not_larger_than_two_-3 (test.test_example.FooTestCase) ... ok - test_not_larger_than_two_0 (test.test_example.FooTestCase) ... ok - test_not_larger_than_two_1 (test.test_example.FooTestCase) ... ok - test_not_larger_than_two_2 (test.test_example.FooTestCase) ... ok - test_undecorated (test.test_example.FooTestCase) ... ok - test_unicode_ascii (test.test_example.FooTestCase) ... ok - test_unicode_non-ascii-\u2603 (test.test_example.FooTestCase) ... ok - ---------------------------------------------------------------------- - Ran 17 tests in 0.002s +.. + program-output:: nosetests -v ../test/test_example.py - OK - -7 test methods + some *magic* decorators = 17 test cases. +The number of test cases actually run and reported separately has been +multiplied.