def testProcWithResultSet(self):
        c = self.cursor()
        try:
            for a in (("table", "sptest"), ("procedure", "sp_proctest")):
                try:
                    c.execute((a) % "drop %s %s")
                except:
                    pass

            c.execute("create table sptest (a int, b varchar(32))")
            c.execute("insert into sptest values (1, 'hello')")
            c.execute("insert into sptest values (2, 'there')")
            c.execute("insert into sptest values (3, 'goodbye')")

            c.execute(""" create procedure sp_proctest (@A int) as select a, b from sptest where a <= @A """)
            self.db.commit()

            c.callproc("sp_proctest", (2,))
            data = c.fetchall()
            self.assertEquals(2, len(data))
            self.assertEquals(2, len(c.description))
            assert c.nextset() is not None, "expected an additional result set"
            data = c.fetchall()
            self.assertEquals(1, len(data))
            self.assertEquals(1, len(c.description))
        finally:
            c.close()

#       def testSalesByCategory(self):
#               c = self.cursor()
#               try:
#                       c.execute("use northwind")
#                       c.callproc(("northwind", "dbo", "SalesByCategory"), ["Seafood", "1998"])
#                       data = c.fetchall()
#                       assert data is not None, "no results from SalesByCategory"
#                       assert len(data) > 0, "expected numerous results"
#               finally:
#                       c.close()
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/zxjdbc/sptest.py/SQLServerSPTest.testProcWithResultSet/swapped operands of `%`