(self)
| 314 | assert a == b == c == d == e == f == g |
| 315 | |
| 316 | def testSymbolList(self): |
| 317 | a = SymbolList(['one', 'two', 'three']) |
| 318 | b = SymbolList([symbol('one'), symbol('two'), symbol('three')]) |
| 319 | c = SymbolList() |
| 320 | c.append('one') |
| 321 | c.extend([symbol('two'), 'three']) |
| 322 | d1 = SymbolList(['one']) |
| 323 | d2 = SymbolList(['two', symbol('three')]) |
| 324 | d = d1 + d2 |
| 325 | e = SymbolList(['one']) |
| 326 | e += SymbolList(['two', symbol('three')]) |
| 327 | f = SymbolList(['one', 'hello', 'goodbye']) |
| 328 | f[1] = symbol('two') |
| 329 | f[2] = 'three' |
| 330 | g = SymbolList(a) |
| 331 | assert a == b == c == d == e == f == g |
| 332 | for v in a: |
| 333 | assert isinstance(v, symbol) |
| 334 | self.assertRaises(TypeError, SymbolList, ['one', None]) |
| 335 | self.assertRaises(TypeError, SymbolList, ['one', 2]) |
| 336 | self.assertRaises(TypeError, SymbolList, ['one', ['two']]) |
| 337 | self.assertRaises(TypeError, SymbolList, ['one', {'two': 3}]) |
| 338 | |
| 339 | def testSymbolListNoRaiseError(self): |
| 340 | a = SymbolList(['one', 'two', 'three', 4], raise_on_error=False) |
nothing calls this directly
no test coverage detected