Exemple #1
0
    def testBoolWithoutAttr(self):
        attrs = {
            "something": "1"
        }

        attr_dict = AttrDictionary(attrs)
        global_pool = attr_dict.bool("global_pool", False)
        self.assertEqual(False, global_pool)
Exemple #2
0
    def testBoolAsDigits(self):
        attrs = {
            "global_pool": "1"
        }

        attr_dict = AttrDictionary(attrs)
        global_pool = attr_dict.bool("global_pool", False)
        self.assertEqual(True, global_pool)