MCPcopy Index your code
hub / github.com/python/mypy / test_split_words

Method test_split_words

mypy/test/testformatter.py:53–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 )
52
53 def test_split_words(self) -> None:
54 assert split_words("Simple message") == ["Simple", "message"]
55 assert split_words('Message with "Some[Long, Types]" in it') == [
56 "Message",
57 "with",
58 '"Some[Long, Types]"',
59 "in",
60 "it",
61 ]
62 assert split_words('Message with "Some[Long, Types]" and [error-code]') == [
63 "Message",
64 "with",
65 '"Some[Long, Types]"',
66 "and",
67 "[error-code]",
68 ]
69 assert split_words('"Type[Stands, First]" then words') == [
70 '"Type[Stands, First]"',
71 "then",
72 "words",
73 ]
74 assert split_words('First words "Then[Stands, Type]"') == [
75 "First",
76 "words",
77 '"Then[Stands, Type]"',
78 ]
79 assert split_words('"Type[Only, Here]"') == ['"Type[Only, Here]"']
80 assert split_words("OneWord") == ["OneWord"]
81 assert split_words(" ") == ["", ""]
82
83
84if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

split_wordsFunction · 0.90

Tested by

no test coverage detected