diff --git a/_pytest/assertion/rewrite.py b/_pytest/assertion/rewrite.py index d4908a467..940c90328 100644 --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -155,13 +155,10 @@ def _use_cached_pyc(source, cache): fp.close() except EnvironmentError: return False - if (len(data) != 8 or - data[:4] != imp.get_magic() or - struct.unpack("