docstr: http://bugs.python.org/issue10811
  
  Recursively using a cursor, such as when reusing it from a generator led to segfaults.
  Now we catch recursive cursor usage and raise a ProgrammingError.
code: def test_recursive_cursor_use(self):
      """
      http://bugs.python.org/issue10811
  
      Recursively using a cursor, such as when reusing it from a generator led to segfaults.
      Now we catch recursive cursor usage and raise a ProgrammingError.
      """
      cur = self.con.cursor()
      cur.execute("create table a (bar)")
      cur.execute("create table b (baz)")
  
      def foo():
          cur.execute("insert into a (bar) values (?)", (1,))
          yield 1
  
      with self.assertRaises(sqlite.ProgrammingError):
          cur.executemany(
              "insert into b (baz) values (?)", ((i,) for i in foo())
          )
  
imports: import datetime
  import unittest
  import sqlite3
  import weakref
  import functools
  from test import support
  from unittest.mock import patch
  from .util import memory_database, cx_limit
  from .util import MemoryDatabaseMixin
label_desc: Use image node_id 21 for calling the RegressionTests obj's underlying member method code with example usage: obj.test_recursive_cursor_use() without return types