'Failure in computing the fingerprint cannot affect a nopython=False
function.  On the other hand, with nopython=True, a ValueError should
be raised to report the failure with fingerprint.'

def test_fingerprint_failure(self):

    @jit
    def foo(x):
        return x
    errmsg = 'cannot    compute    fingerprint    of    empty    list'
    with self.assertRaises(ValueError) as raises:
        _dispatcher.compute_fingerprint([])
    self.assertIn(errmsg, str(raises.exception))
    self.assertEqual(foo([]), [])
    strict_foo = jit(nopython=True)(foo.py_func)
    with self.assertRaises(ValueError) as raises:
        strict_foo([])
    self.assertIn(errmsg, str(raises.exception))
    @jit
    def bar():
        object()
        x = []
        for i in range(10):
            x = foo(x)
        return x
    self.assertEqual(bar(), [])
    [cr] = bar.overloads.values()
    self.assertEqual(len(cr.lifted), 1)
