# HG changeset patch # User Jeff Hammel # Date 1295365910 28800 # Node ID 7dbc3cdadffe89794fbf52b0d6e2a0ee0a5d49a4 # Parent b8d5d2041fe075cda2c82c6bfb89bee1b2ecfb80 add a test for the python-package template diff -r b8d5d2041fe0 -r 7dbc3cdadffe examples/doctest.txt --- 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) diff -r b8d5d2041fe0 -r 7dbc3cdadffe makeitso/python.py --- a/makeitso/python.py Mon Jan 17 14:38:42 2011 -0800 +++ b/makeitso/python.py Tue Jan 18 07:51:50 2011 -0800 @@ -31,6 +31,8 @@ name = 'python-package' templates = ['python_package'] vars = [Variable('description'), + Variable('author', 'author of the package'), + Variable('email', "author's email"), Variable('url'), Variable('repo', 'project repository'), ]