def METHOD_NAME(self, device_cc, expected_arch):
    with mock.patch('cupy.cuda.device.Device') as device_class:
        device_class.return_value.compute_capability = device_cc
        assert compiler._get_arch() == expected_arch
    cupy.clear_memo()  # _get_arch result is cached