def Check_zeros(self):
        """special func to check when array is all ones"""

        if hasattr(self, 'expect_zeros'):
            cur = self.con.cursor()
            cur.execute("select %s(zeros) from test" % self.name)
            val = cur.fetchone()[0]

            if isfloat(val) and isfloat(self.expect_ones):
                self.failUnlessAlmostEqual(val, self.expect_zeros, 6)
            else:
                self.failUnlessEqual(val, self.expect_zeros)
    def Check_modefive(self):
        """special func to check mode aggregate"""

        if hasattr(self, 'expect_modefive'):
            cur = self.con.cursor()
            cur.execute("select %s(modefive) from test" % self.name)
            val = cur.fetchone()[0]

            if isfloat(val) and isfloat(self.expect_modefive):
                self.failUnlessAlmostEqual(val, self.expect_modefive, 6)
            else:
                self.failUnlessEqual(val, self.expect_modefive)
    def Check_n2(self):
        """special func to check an array of 2"""

        if hasattr(self, 'expect_n2'):
            cur = self.con.cursor()
            cur.execute("select %s(n2) from test" % self.name)
            val = cur.fetchone()[0]

            if isfloat(val) and isfloat(self.expect_n2):
                self.failUnlessAlmostEqual(val, self.expect_n2, 6)
            else:
                self.failUnlessEqual(val, self.expect_n2)
    def Check_empty(self):
        """check how aggregate handles an empty list"""

        if hasattr(self, 'expect_empty'):
            cur = self.con.cursor()
            cur.execute("select %s(empty) from test" % self.name)
            val = cur.fetchone()[0]

            if isfloat(val) and isfloat(self.expect_empty):
                self.failUnlessAlmostEqual(val, self.expect_empty, 6)
            else:
                self.failUnlessEqual(val, self.expect_empty)
    def Check_inf(self):
        """check how aggregate handles float data containing inf values"""

        if hasattr(self, 'expect_inf'):
            cur = self.con.cursor()
            cur.execute("select %s(hasinf) from test" % self.name)
            val = cur.fetchone()[0]

            if isfloat(val) and isfloat(self.expect_inf):
                self.failUnlessAlmostEqual(val, self.expect_inf, 6)
            else:
                self.failUnlessEqual(val, self.expect_inf)
    def Check_zeros(self):
        """special func to check when array is all ones"""

        if hasattr(self,'expect_zeros'):
            cur = self.con.cursor()
            cur.execute("select %s(zeros) from test"%self.name)
            val = cur.fetchone()[0]
            
            if isfloat(val) and isfloat(self.expect_ones):
                self.failUnlessAlmostEqual(val, self.expect_zeros, 6)
            else:
                self.failUnlessEqual(val, self.expect_zeros)
    def Check_text(self):
        """check how aggregate handles text data"""

        if hasattr(self, 'expect_text'):
            cur = self.con.cursor()
            cur.execute("select %s(t) from test" % self.name)
            val = cur.fetchone()[0]

            if isfloat(val) and isfloat(self.expect_text):
                self.failUnlessAlmostEqual(val, self.expect_text, 6)
            else:
                self.failUnlessEqual(val, self.expect_text)
    def Check_n2(self):
        """special func to check an array of 2"""

        if hasattr(self,'expect_n2'):
            cur = self.con.cursor()
            cur.execute("select %s(n2) from test"%self.name)
            val = cur.fetchone()[0]
            
            if isfloat(val) and isfloat(self.expect_n2):
                self.failUnlessAlmostEqual(val, self.expect_n2, 6)
            else:
                self.failUnlessEqual(val, self.expect_n2)
    def Check_modefive(self):
        """special func to check mode aggregate"""

        if hasattr(self,'expect_modefive'):
            cur = self.con.cursor()
            cur.execute("select %s(modefive) from test"%self.name)
            val = cur.fetchone()[0]
            
            if isfloat(val) and isfloat(self.expect_modefive):
                self.failUnlessAlmostEqual(val, self.expect_modefive, 6)
            else:
                self.failUnlessEqual(val, self.expect_modefive)
 def Check_inf(self):
     """check how aggregate handles float data containing inf values"""
     
     if hasattr(self,'expect_inf'):
         cur = self.con.cursor()
         cur.execute("select %s(hasinf) from test"%self.name)
         val = cur.fetchone()[0]
         
         if isfloat(val) and isfloat(self.expect_inf):
             self.failUnlessAlmostEqual(val, self.expect_inf, 6)
         else:
             self.failUnlessEqual(val, self.expect_inf)
    def Check_empty(self):
        """check how aggregate handles an empty list"""

        if hasattr(self,'expect_empty'):
            cur = self.con.cursor()
            cur.execute("select %s(empty) from test"%self.name)
            val = cur.fetchone()[0]
            
            if isfloat(val) and isfloat(self.expect_empty):
                self.failUnlessAlmostEqual(val, self.expect_empty, 6)
            else:
                self.failUnlessEqual(val, self.expect_empty)
    def Check_text(self):
        """check how aggregate handles text data"""

        if hasattr(self,'expect_text'):
            cur = self.con.cursor()
            cur.execute("select %s(t) from test"%self.name)
            val = cur.fetchone()[0]
            
            if isfloat(val) and isfloat(self.expect_text):
                self.failUnlessAlmostEqual(val, self.expect_text, 6)
            else:
                self.failUnlessEqual(val, self.expect_text)