

def test_factory(self):
    proxy = LocalProxy('test', factory=dict)
    proxy.assertTrue(isinstance(proxy._represented_local_object(), dict))
    self.assertEqual(0, len(proxy))
    proxy['foo'] = 'bar'
    self.assertEqual('bar', thread_locals.test['foo'])

dataset/ETHPy150Open Stiivi/bubbles/tests/test_locals.py TestLocalProxy.test_factory/VarMisuse@21/26 `self`->`proxy`