def test_none_typed_method_fails(self):
        """ Test that unsupported operations on List[None] raise. """
        def generate_function(line1, line2):
            context = {}
            exec(dedent("""
                from numba.typed import List
                def bar():
                    lst = List()
                    {}
                    {}
                """.format(line1, line2)), context)
            return njit(context["bar"])
        for line1, line2 in (
                ("lst.append(None)", "lst.pop()"),
                ("lst.append(None)", "del lst[0]"),
                ("lst.append(None)", "lst.count(None)"),
                ("lst.append(None)", "lst.index(None)"),
                ("lst.append(None)", "lst.insert(0, None)"),
                (""                , "lst.insert(0, None)"),
                ("lst.append(None)", "lst.clear()"),
                ("lst.append(None)", "lst.copy()"),
                ("lst.append(None)", "lst.extend([None])"),
                ("",                 "lst.extend([None])"),
                ("lst.append(None)", "lst.remove(None)"),
                ("lst.append(None)", "lst.reverse()"),
                ("lst.append(None)", "None in lst"),
        ):
            with self.assertRaises(TypingError) as raises:
                foo = generate_function(line1, line2)
                foo()
            self.assertIn(
                "method support for List[None] is limited",
                str(raises.exception),
            )
 Test that unsupported operations on List[None] raise. 
numba/tests/test_typedlist.py