From 779afa86fb66c13059fa3d9dde23a49b69326ad4 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Tue, 12 Mar 2024 10:19:54 +0100 Subject: [PATCH] Make tests pass in 2032 Background: As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future. The usual offset is +16 years, because that is how long I expect some software will be used in some places. This showed up failing tests in our package build. See https://reproducible-builds.org/ for why this matters. --- tests/benchmarks/test_micro_benchmarks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/benchmarks/test_micro_benchmarks.py b/tests/benchmarks/test_micro_benchmarks.py index 6086c5bd7..80b3e6a47 100644 --- a/tests/benchmarks/test_micro_benchmarks.py +++ b/tests/benchmarks/test_micro_benchmarks.py @@ -635,13 +635,13 @@ def test_date_from_datetime_str(self, benchmark, validator): def test_core_future(self, benchmark): v = SchemaValidator({'type': 'date', 'gt': date.today()}) - benchmark(v.validate_python, date(2032, 1, 1)) + benchmark(v.validate_python, date(2932, 1, 1)) @pytest.mark.benchmark(group='date future') def test_core_future_str(self, benchmark): v = SchemaValidator({'type': 'date', 'gt': date.today()}) - benchmark(v.validate_python, str(date(2032, 1, 1))) + benchmark(v.validate_python, str(date(2932, 1, 1))) class TestBenchmarkUnion: