def test_multiple_iterators(self):
        """
        Make sure that things work with multiple iterator objects
        alive at one time.
        """
        db = self.db_class(leveldb.Options(), self.db_path, create_if_missing=True)
        entries = [('a', 'b'), ('b', 'b')]
        db.Put(leveldb.WriteOptions(), *entries[0])
        db.Put(leveldb.WriteOptions(), *entries[1])
        iter1 = iter(db)
        iter2 = iter(db)
        self.assertEqual(iter1.next(), entries[0])
        # garbage collect iter1, seek iter2 past the end of the db. Make sure
        # everything works.
        del iter1
        iter2.seek('z')
        self.assertRaises(StopIteration, iter2.next)
        db.close()

        Make sure that things work with multiple iterator objects
        alive at one time.
        
pymclevel/test_leveldb.py