def _test_add_sub_td_no_match(self, operation):
        """
        Tests that attempting to add/sub a datetime64 and timedelta64
        with types that cannot be cast raises a reasonable exception.
        """
        @njit
        def impl(a, b):
            return operation(a, b)

        fname = operation.__name__
        expected = re.escape((f"ufunc '{fname}' is not supported between "
                              "datetime64[ns] and timedelta64[M]"))
        with self.assertRaisesRegex((TypingError, TypeError), expected):
            impl(
                np.array([np.datetime64("2011-01-01"),],
                         dtype="datetime64[ns]"),
                np.timedelta64(1000,'M')
            )

        Tests that attempting to add/sub a datetime64 and timedelta64
        with types that cannot be cast raises a reasonable exception.
        
numba/tests/test_npdatetime.py