Skip to content

Commit

Permalink
Fix Sphinx warnings about inclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed May 8, 2018
1 parent 250408c commit 5b248c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ckan/tests/logic/action/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
Here's an example of a simple :mod:`ckan.logic.action` test:
.. literalinclude:: ../../ckan/tests/logic/action/test_update.py
:start-after: ## START-AFTER
:end-before: ## END-BEFORE
:start-after: # START-AFTER
:end-before: # END-BEFORE
.. todo::
Expand Down
4 changes: 2 additions & 2 deletions ckan/tests/logic/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Here's an example of a simple :py:mod:`ckan.logic.auth` test:
.. literalinclude:: ../../ckan/tests/logic/auth/test_update.py
:start-after: ## START-AFTER
:end-before: ## END-BEFORE
:start-after: # START-AFTER
:end-before: # END-BEFORE
'''
16 changes: 8 additions & 8 deletions doc/contributing/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,17 @@ Most CKAN tests should follow this form. Here's an example of a simple action
function test demonstrating the recipe:

.. literalinclude:: /../ckan/tests/logic/action/test_update.py
:start-after: ## START-AFTER
:end-before: ## END-BEFORE
:start-after: # START-AFTER
:end-before: # END-BEFORE

One common exception is when you want to use a ``for`` loop to call the
function being tested multiple times, passing it lots of different arguments
that should all produce the same return value and/or side effects. For example,
this test from :py:mod:`ckan.tests.logic.action.test_update`:

.. literalinclude:: /../ckan/tests/logic/action/test_update.py
:start-after: ## START-FOR-LOOP-EXAMPLE
:end-before: ## END-FOR-LOOP-EXAMPLE
:start-after: # START-FOR-LOOP-EXAMPLE
:end-before: # END-FOR-LOOP-EXAMPLE

The behavior of :py:func:`~ckan.logic.action.update.user_update` is the same
for every invalid value.
Expand Down Expand Up @@ -342,8 +342,8 @@ going on, but here's an example of a test from
out :py:mod:`ckan.model`:

.. literalinclude:: /../ckan/tests/logic/auth/test_update.py
:start-after: ## START-AFTER
:end-before: ## END-BEFORE
:start-after: # START-AFTER
:end-before: # END-BEFORE

----

Expand Down Expand Up @@ -412,8 +412,8 @@ make these common asserts easy. To use one of these decorators you have to:
Here's an example of a simple validator test that uses this technique:

.. literalinclude:: /../ckan/tests/logic/test_validators.py
:start-after: ## START-AFTER
:end-before: ## END-BEFORE
:start-after: # START-AFTER
:end-before: # END-BEFORE


No tests for :mod:`ckan.logic.schema.py`
Expand Down

0 comments on commit 5b248c1

Please sign in to comment.