(self)
| 92 | self.assertEqual(fmt.format("{0!a}", chr(256)), "'\\u0100'") |
| 93 | |
| 94 | def test_name_lookup(self): |
| 95 | fmt = string.Formatter() |
| 96 | class AnyAttr: |
| 97 | def __getattr__(self, attr): |
| 98 | return attr |
| 99 | x = AnyAttr() |
| 100 | self.assertEqual(fmt.format("{0.lumber}{0.jack}", x), 'lumberjack') |
| 101 | with self.assertRaises(AttributeError): |
| 102 | fmt.format("{0.lumber}{0.jack}", '') |
| 103 | |
| 104 | def test_index_lookup(self): |
| 105 | fmt = string.Formatter() |
nothing calls this directly
no test coverage detected