diff makeitso/python.py @ 242:5cb893831f53

fix for when output is not supplied
author Jeff Hammel <k0scist@gmail.com>
date Tue, 23 Aug 2016 15:34:27 -0700
parents cab05bfc59ab
children fb70a9c72ec2
line wrap: on
line diff
--- a/makeitso/python.py	Tue Feb 23 14:12:01 2016 -0800
+++ b/makeitso/python.py	Tue Aug 23 15:34:27 2016 -0700
@@ -38,7 +38,7 @@
     """template for python unittest"""
     templates = [('python_package', 'tests', 'test_{{package}}.py')]
     def pre(self, variables, output):
-        if 'package' not in variables:
+        if output and 'package' not in variables:
             package = os.path.splitext(os.path.basename(output.rstrip(os.path.sep)))[0]
             indicator = 'test_'
             if package.startswith(indicator):