def test_many_discarded_relationships(self):

        m1 = MetaData()
        t1 = Table('t1', m1, Column('id', Integer, primary_key=True))
        t2 = Table(
            't2', m1, Column('id', Integer, primary_key=True),
            Column('t1id', ForeignKey('t1.id')))

        class T1(object):
            pass
        t1_mapper = mapper(T1, t1)

        @testing.emits_warning()
        @profile_memory()
        def go():
            class T2(object):
                pass
            t2_mapper = mapper(T2, t2)
            t1_mapper.add_property("bar", relationship(t2_mapper))
            s1 = Session()
            # this causes the path_registry to be invoked
            s1.query(t1_mapper)._compile_context()
        go()

    # fails on newer versions of pysqlite due to unusual memory behvior
    # in pysqlite itself. background at:
    # http://thread.gmane.org/gmane.comp.python.db.pysqlite.user/2290
Adds a new mutation for an entity with a partial key.
dataset/ETHPy150Open zzzeek/sqlalchemy/test/aaa_profiling/test_memusage.py/MemUsageTest.test_many_discarded_relationships--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/datastore/batch.py/Batch._add_partial_key_entity_pb