(self)
| 19 | |
| 20 | class TestCPython(unittest.TestCase): |
| 21 | def test_message(self): |
| 22 | t = pycompletionserver.CompletionServer(0) |
| 23 | |
| 24 | l = [] |
| 25 | l.append(("Def", "description", "args")) |
| 26 | l.append(("Def1", "description1", "args1")) |
| 27 | l.append(("Def2", "description2", "args2")) |
| 28 | |
| 29 | msg = t.processor.format_completion_message(None, l) |
| 30 | |
| 31 | self.assertEqual("@@COMPLETIONS(None,(Def,description,args),(Def1,description1,args1),(Def2,description2,args2))END@@", msg) |
| 32 | l = [] |
| 33 | l.append(("Def", "desc,,r,,i()ption", "")) |
| 34 | l.append(("Def(1", "descriptio(n1", "")) |
| 35 | l.append(("De,f)2", "de,s,c,ription2", "")) |
| 36 | msg = t.processor.format_completion_message(None, l) |
| 37 | self.assertEqual( |
| 38 | "@@COMPLETIONS(None,(Def,desc%2C%2Cr%2C%2Ci%28%29ption, ),(Def%281,descriptio%28n1, ),(De%2Cf%292,de%2Cs%2Cc%2Cription2, ))END@@", |
| 39 | msg, |
| 40 | ) |
| 41 | |
| 42 | def create_connections(self): |
| 43 | """ |
nothing calls this directly
no test coverage detected