def test_cursor_declare(self): sql = ('DECLARE CURSOR "foo" AS SELECT 1;\n' 'SELECT 2;') stmts = sqlparse.split(sql) self.assertEqual(len(stmts), 2)