From bd70f5c1488a7a74900670e3dad2cc2e32744c8a Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 14 Mar 2019 08:16:07 -0300 Subject: [PATCH] Add test for mtime issue in #4903 --- testing/test_assertrewrite.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 098e106f9..bdfbf823c 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -1197,6 +1197,29 @@ class TestIssue2121: result.stdout.fnmatch_lines("*E*assert (1 + 1) == 3") +@pytest.mark.parametrize("offset", [-1, +1]) +def test_source_mtime_long_long(testdir, offset): + """Support modification dates after 2038 in rewritten files (#4903). + + pytest would crash with: + + fp.write(struct.pack("