def test_dict_update(self):
        """
        Tests dict.update works with various dictionaries.
        """
        n = 10

        def f1(n):
            """
            Test update with a regular dictionary.
            """
            d1 = {i: i + 1 for i in range(n)}
            d2 = {3 * i: i for i in range(n)}
            d1.update(d2)
            return d1

        py_func = f1
        cfunc = njit()(f1)
        a = py_func(n)
        b = cfunc(n)
        self.assertEqual(a, b)

        def f2(n):
            """
            Test update where one of the dictionaries
            is created as a Python literal.
            """
            d1 = {
                1: 2,
                3: 4,
                5: 6
            }
            d2 = {3 * i: i for i in range(n)}
            d1.update(d2)
            return d1

        py_func = f2
        cfunc = njit()(f2)
        a = py_func(n)
        b = cfunc(n)
        self.assertEqual(a, b)

        Tests dict.update works with various dictionaries.
        
numba/tests/test_dictobject.py