##// END OF EJS Templates
Increase coverage for completer tests
krassowski -
Show More
@@ -886,6 +886,12 class TestCompleter(unittest.TestCase):
886 886 assert match(keys, "2") == ("", 0, ["21", "22"])
887 887 assert match(keys, "0b101") == ("", 0, ["0b10101", "0b10110"])
888 888
889 # Should yield on variables
890 assert match(keys, "a_variable") == ("", 0, [])
891
892 # Should pass over invalid literals
893 assert match(keys, "'' ''") == ("", 0, [])
894
889 895 def test_match_dict_keys_tuple(self):
890 896 """
891 897 Test that match_dict_keys called with extra prefix works on a couple of use case,
@@ -1687,6 +1693,9 class TestCompleter(unittest.TestCase):
1687 1693 ["0b_0011_1111_0100_1110", "0b_0011_1111_0100_1110"],
1688 1694 ["0xdeadbeef", "0xdeadbeef"],
1689 1695 ["0b_1110_0101", "0b_1110_0101"],
1696 # should not match if in an operation
1697 ["1 + 1", None],
1698 [", 1 + 1", None],
1690 1699 ],
1691 1700 )
1692 1701 def test_match_numeric_literal_for_dict_key(input, expected):
General Comments 0
You need to be logged in to leave comments. Login now