'Check performance warning(s) for non-contiguity.'

@contextlib.contextmanager
def check_contiguity_warning(self, pyfunc):

    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter('always', errors.PerformanceWarning)
        (yield)
    self.assertGreaterEqual(len(w), 1)
    self.assertIs(w[0].category, errors.PerformanceWarning)
    self.assertIn('faster    on    contiguous    arrays', str(w[0].message))
    self.assertEqual(w[0].filename, pyfunc.__code__.co_filename)
    self.assertEqual(w[0].lineno, (pyfunc.__code__.co_firstlineno + 1))
