(self)
| 315 | raises(ValueError, s.substitute, dict(who='tim')) |
| 316 | |
| 317 | def test_idpattern_override(self): |
| 318 | class PathPattern(Template): |
| 319 | idpattern = r'[_a-z][._a-z0-9]*' |
| 320 | m = Mapping() |
| 321 | m.bag = Bag() |
| 322 | m.bag.foo = Bag() |
| 323 | m.bag.foo.who = 'tim' |
| 324 | m.bag.what = 'ham' |
| 325 | s = PathPattern('$bag.foo.who likes to eat a bag of $bag.what') |
| 326 | self.assertEqual(s.substitute(m), 'tim likes to eat a bag of ham') |
| 327 | |
| 328 | def test_flags_override(self): |
| 329 | class MyPattern(Template): |
nothing calls this directly
no test coverage detected