Beispiel #1
0
    def test_fromcallable(self):
        a = DefaultDict.fromcallable(('1', '2'), lambda: [])
        assert not a['1'] is a['2']

        b = DefaultDict(('1', '2'), [])
        assert b['1'] is b['2']
 def setUp(self):
     bld = DefaultDict.fromcallable(
             avkeys = build_config_factory_flags(),
             default = lambda: [])
     self.fa = BuildConfigFactory(bld)
Beispiel #3
0
    def test_fromcallable(self):
        a = DefaultDict.fromcallable(('1', '2'), lambda: [])
        assert not a['1'] is a['2']

        b = DefaultDict(('1', '2'), [])
        assert b['1'] is b['2']