comparison makeitso/template.py @ 256:f10f5beb8ad1

pytest now actually runs the tests
author Jeff Hammel <k0scist@gmail.com>
date Sat, 27 May 2017 09:37:15 -0700
parents cfd4f1e91090
children
comparison
equal deleted inserted replaced
255:4a0bf841ebbf 256:f10f5beb8ad1
31 def copy(self): 31 def copy(self):
32 """returns a copy of the variable""" 32 """returns a copy of the variable"""
33 return Variable(self.name, self.description, self.default, self.cast) 33 return Variable(self.name, self.description, self.default, self.cast)
34 34
35 def set(self, value): 35 def set(self, value):
36 if self.cast: 36 self.value = self.cast(value) if self.cast else value
37 self.value = self.cast(value)
38 else:
39 self.value = value
40 self._set = True 37 self._set = True
41 return self.value 38 return self.value
42 39
43 def isset(self): 40 def isset(self):
44 """whether the variable has been set or not""" 41 """whether the variable has been set or not"""