changeset 256:f10f5beb8ad1

pytest now actually runs the tests
author Jeff Hammel <k0scist@gmail.com>
date Sat, 27 May 2017 09:37:15 -0700
parents 4a0bf841ebbf
children 28d76b139fdd
files makeitso/makeitso.py makeitso/template.py tox.ini
diffstat 3 files changed, 3 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/makeitso/makeitso.py	Fri May 26 14:18:47 2017 -0700
+++ b/makeitso/makeitso.py	Sat May 27 09:37:15 2017 -0700
@@ -429,15 +429,6 @@
                           default=True, action='store_false',
                           help="don't read ~/.makeitso")
 
-    # TODO:
-#     parser.add_option('-u', '--update', dest='update',
-#                       help="update the specified .ini file for variables read from this run")
-#     parser.add_option('-U', '--Update', dest='Update',
-#                       help="same as -u, but update the global [DEFAULTS] section")
-#     parser.add_option('--dry-run', dest='dry_run',
-#                       default=False, action='store_true',
-#                       help="don't actually do the substitution but do everything else")
-
     # options for getting information
     parser.add_option('--commandline', dest='commandline',
                       action='store_true', default=False,
--- a/makeitso/template.py	Fri May 26 14:18:47 2017 -0700
+++ b/makeitso/template.py	Sat May 27 09:37:15 2017 -0700
@@ -33,10 +33,7 @@
         return Variable(self.name, self.description, self.default, self.cast)
 
     def set(self, value):
-        if self.cast:
-            self.value = self.cast(value)
-        else:
-            self.value = value
+        self.value = self.cast(value) if self.cast else value
         self._set = True
         return self.value
 
--- a/tox.ini	Fri May 26 14:18:47 2017 -0700
+++ b/tox.ini	Sat May 27 09:37:15 2017 -0700
@@ -2,4 +2,5 @@
 [tox]
 envlist=py27
 [testenv]
-commands=python setup.py test
\ No newline at end of file
+deps=pytest
+commands=pytest tests/
\ No newline at end of file