(self)
| 315 | self.assertIsInstance(matches, list) |
| 316 | |
| 317 | def test_latex_completions(self): |
| 318 | ip = get_ipython() |
| 319 | # Test some random unicode symbols |
| 320 | keys = random.sample(sorted(latex_symbols), 10) |
| 321 | for k in keys: |
| 322 | text, matches = ip.complete(k) |
| 323 | self.assertEqual(text, k) |
| 324 | self.assertEqual(matches, [latex_symbols[k]]) |
| 325 | # Test a more complex line |
| 326 | text, matches = ip.complete("print(\\alpha") |
| 327 | self.assertEqual(text, "\\alpha") |
| 328 | self.assertEqual(matches[0], latex_symbols["\\alpha"]) |
| 329 | # Test multiple matching latex symbols |
| 330 | text, matches = ip.complete("\\al") |
| 331 | self.assertIn("\\alpha", matches) |
| 332 | self.assertIn("\\aleph", matches) |
| 333 | |
| 334 | def test_latex_no_results(self): |
| 335 | """ |
nothing calls this directly
no test coverage detected