(self)
| 243 | self._testArray("long", 0, "null") |
| 244 | |
| 245 | def testPropertyDict(self): |
| 246 | a = PropertyDict(one=1, two=2, three=3) |
| 247 | b = PropertyDict({'one': 1, 'two': 2, 'three': 3}) |
| 248 | c = PropertyDict(zip(['one', 'two', 'three'], [1, 2, 3])) |
| 249 | d = PropertyDict([('two', 2), ('one', 1), ('three', 3)]) |
| 250 | e = PropertyDict({symbol('three'): 3, symbol('one'): 1, symbol('two'): 2}) |
| 251 | f = PropertyDict(a) |
| 252 | g = PropertyDict() |
| 253 | g['one'] = 1 |
| 254 | g[symbol('two')] = 2 |
| 255 | g['three'] = 3 |
| 256 | assert a == b == c == d == e == f == g |
| 257 | for k in a.keys(): |
| 258 | assert isinstance(k, symbol) |
| 259 | self.assertRaises(KeyError, AnnotationDict, {'one': 1, None: 'none'}) |
| 260 | self.assertRaises(KeyError, AnnotationDict, {'one': 1, 1.23: 4}) |
| 261 | |
| 262 | def testPropertyDictNoRaiseError(self): |
| 263 | a = PropertyDict(one=1, two=2, three=3, raise_on_error=False) |
nothing calls this directly
no test coverage detected