MCPcopy Index your code
hub / github.com/python/cpython / test_funky_hyphens

Method test_funky_hyphens

Lib/test/test_textwrap.py:307–322  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

305 self.check_split(text, expect)
306
307 def test_funky_hyphens (self):
308 # Screwy edge cases cooked up by David Goodger. All reported
309 # in SF bug #596434.
310 self.check_split("what the--hey!", ["what", " ", "the", "--", "hey!"])
311 self.check_split("what the--", ["what", " ", "the--"])
312 self.check_split("what the--.", ["what", " ", "the--."])
313 self.check_split("--text--.", ["--text--."])
314
315 # When I first read bug #596434, this is what I thought David
316 # was talking about. I was wrong; these have always worked
317 # fine. The real problem is tested in test_funky_parens()
318 # below...
319 self.check_split("--option", ["--option"])
320 self.check_split("--option-opt", ["--option-", "opt"])
321 self.check_split("foo --option-opt bar",
322 ["foo", " ", "--option-", "opt", " ", "bar"])
323
324 def test_punct_hyphens(self):
325 # Oh bother, SF #965425 found another problem with hyphens --

Callers

nothing calls this directly

Calls 1

check_splitMethod · 0.80

Tested by

no test coverage detected