From 223e494d562835408409115cadba3807ac1ede5f Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Mon, 3 Aug 2015 15:57:06 +0300 Subject: [PATCH] Replacing static provider documentation examples with literalincludes --- docs/providers/static.rst | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/docs/providers/static.rst b/docs/providers/static.rst index c9e2d5df..c7dedd3a 100644 --- a/docs/providers/static.rst +++ b/docs/providers/static.rst @@ -14,29 +14,5 @@ readability and providing object's type. Example: -.. code-block:: python - - """`Static` providers example.""" - - from objects.providers import Class - from objects.providers import Object - from objects.providers import Function - from objects.providers import Value - - - # Provides class - `object`: - cls_provider = Class(object) - assert cls_provider() is object - - # Provides object - `object()`: - object_provider = Object(object()) - assert isinstance(object_provider(), object) - - # Provides function - `len`: - function_provider = Function(len) - assert function_provider() is len - - # Provides value - `123`: - value_provider = Value(123) - assert value_provider() == 123 - +.. literalinclude:: ../../examples/providers/static.py + :language: python