diff examples/doctest.txt @ 115:7dbc3cdadffe

add a test for the python-package template
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 18 Jan 2011 07:51:50 -0800
parents b54898f7d8a9
children 908e9a653668
line wrap: on
line diff
--- a/examples/doctest.txt	Mon Jan 17 14:38:42 2011 -0800
+++ b/examples/doctest.txt	Tue Jan 18 07:51:50 2011 -0800
@@ -136,3 +136,16 @@
     >>> ('%o' % os.stat(buffer).st_mode).endswith('755')
     True
     >>> os.remove(buffer)
+
+Test python package template using the entry point::
+
+    >>> 'python-package' in makeitso.get_entry_points()
+    True
+    >>> template = makeitso.PolyTemplate(['python-package'], interactive=False)
+    >>> missing = template.missing()
+    >>> sorted(missing)
+    ['author', 'description', 'email', 'repo', 'url']
+    >>> tempdir = tempfile.mkdtemp()
+    >>> variables = dict([(i, i) for i in missing])
+    >>> template.substitute(variables, output=tempdir)
+    >>> shutil.rmtree(tempdir)