def testBoolWithoutAttr(self): attrs = { "something": "1" } attr_dict = AttrDictionary(attrs) global_pool = attr_dict.bool("global_pool", False) self.assertEqual(False, global_pool)
def testBoolAsDigits(self): attrs = { "global_pool": "1" } attr_dict = AttrDictionary(attrs) global_pool = attr_dict.bool("global_pool", False) self.assertEqual(True, global_pool)