Example #1
0
File: test.py Project: cdsi/elrond
        def testObject(self):
                print

                o = Object()

                self.assertEquals(True, o.to_bool(True))
                self.assertEquals(False, o.to_bool(False))

                self.assertEquals(True, o.to_bool("True"))
                self.assertEquals(False, o.to_bool("False"))

                self.assertRaises(TypeError, o.to_bool, 42)
                self.assertRaises(TypeError, o.to_bool, "FOOBAR")
Example #2
0
File: plot.py Project: cdsi/grima
        def __init__(self):
                Object.__init__(self)

                self.enabled = False
                self.container = None
                self.type = 'console'
                self.title = None

                # TODO: use preferences
                self.xmin = 0
                self.xmax = 0
                self.yminl = 0
                self.ymaxl = 0
                self.yminr = 0
                self.ymaxr = 0
                self.overlay = False
Example #3
0
File: db.py Project: cdsi/elrond
 def __setattr__(self, name, value):
         if name in self.attrs:
                 self.attrs[name]['value'] = value
         Object.__setattr__(self, name, value)
Example #4
0
File: db.py Project: cdsi/elrond
 def __getattr__(self, name):
         return Object.__getattr__(self, name)
Example #5
0
        def __init__(self, *args, **kwargs):
                Object.__init__(self, *args, **kwargs)

                self.socket = None
Example #6
0
File: plot.py Project: cdsi/grima
        def __init__(self):
                Object.__init__(self)

                self.__storage = {
                        'data': []
                }