def test_close(self):
        d1 = {}
        s = shelve.Shelf(d1, protocol=2, writeback=False)
        s['key1'] = [1,2,3,4]
        self.assertEqual(s['key1'], [1,2,3,4])
        self.assertEqual(len(s), 1)
        s.close()
        self.assertRaises(ValueError, len, s)
        try:
            s['key1']
        except __HOLE__:
            pass
        else:
            self.fail('Closed shelf should not find a key')
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_shelve.py/TestCase.test_close