Test handling of unicode in dict key completion
(self)
| 1655 | self.assertNotIn("abd", matches) |
| 1656 | |
| 1657 | def test_dict_key_completion_unicode_py3(self): |
| 1658 | """Test handling of unicode in dict key completion""" |
| 1659 | ip = get_ipython() |
| 1660 | complete = ip.Completer.complete |
| 1661 | |
| 1662 | ip.user_ns["d"] = {"a\u05d0": None} |
| 1663 | |
| 1664 | # query using escape |
| 1665 | if sys.platform != "win32": |
| 1666 | # Known failure on Windows |
| 1667 | _, matches = complete(line_buffer="d['a\\u05d0") |
| 1668 | self.assertIn("u05d0", matches) # tokenized after \\ |
| 1669 | |
| 1670 | # query using character |
| 1671 | _, matches = complete(line_buffer="d['a\u05d0") |
| 1672 | self.assertIn("a\u05d0", matches) |
| 1673 | |
| 1674 | with greedy_completion(): |
| 1675 | # query using escape |
| 1676 | _, matches = complete(line_buffer="d['a\\u05d0") |
| 1677 | self.assertIn("d['a\\u05d0']", matches) # tokenized after \\ |
| 1678 | |
| 1679 | # query using character |
| 1680 | _, matches = complete(line_buffer="d['a\u05d0") |
| 1681 | self.assertIn("d['a\u05d0']", matches) |
| 1682 | |
| 1683 | @dec.skip_without("numpy") |
| 1684 | def test_struct_array_key_completion(self): |
nothing calls this directly
no test coverage detected