(self, arg, expect)
| 254 | [("spam", "")], [("foo", ',;"')], [("bar", "")]]), |
| 255 | ]) |
| 256 | def test_split_header_words(self, arg, expect): |
| 257 | try: |
| 258 | result = split_header_words([arg]) |
| 259 | except: |
| 260 | import traceback, io |
| 261 | f = io.StringIO() |
| 262 | traceback.print_exc(None, f) |
| 263 | result = "(error -- traceback follows)\n\n%s" % f.getvalue() |
| 264 | self.assertEqual(result, expect, """ |
| 265 | When parsing: '%s' |
| 266 | Expected: '%s' |
| 267 | Got: '%s' |
| 268 | """ % (arg, expect, result)) |
| 269 | |
| 270 | @support.subTests('arg,expect', [ |
| 271 | ("foo", "foo"), |
nothing calls this directly
no test coverage detected