diff examples/doctest.txt @ 91:672d2d3ee322

document a bit and add a test for an include example
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 10 Jan 2011 21:42:32 -0800
parents 26b9c3bba04e
children e74baa8e6df4
line wrap: on
line diff
--- a/examples/doctest.txt	Mon Jan 10 21:33:03 2011 -0800
+++ b/examples/doctest.txt	Mon Jan 10 21:42:32 2011 -0800
@@ -37,6 +37,14 @@
     'Hello fleem'
     >>> os.remove(buffer)
 
+Including a file::
+
+    >>> include_example = os.path.join(here, 'include-example.txt')
+    >>> buffer = tempfile.mktemp()
+    >>> template = makeitso.PolyTemplate([include_example], interactive=False)
+    >>> template.substitute({}, buffer)
+    >>> os.remove(buffer)
+
 Directory case::
 
     >>> exampledir = os.path.join(here, 'directory-example')