From e8ff0094d6dc1ed5c77edbff5201b064bd1fe93f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 16 Aug 2026 11:31:21 +0200 Subject: [PATCH] python3-time-machine: load pytester plugin for testdir fixture in ptest test_marker_function/_and_fixture/_class/_module use the "testdir" fixture, provided by pytest builtin pytester plugin. That plugin is not autoloaded; upstream pyproject.toml sets addopts = "-p pytester" but that file is not shipped into the ptest tree, so the fixture is unavailable and these 4 tests error out (fixture testdir not found). Pass -p pytester directly in run-ptest. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- .../recipes-devtools/python/python3-time-machine_3.2.0.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta-python/recipes-devtools/python/python3-time-machine_3.2.0.bb b/meta-python/recipes-devtools/python/python3-time-machine_3.2.0.bb index 32d64f8d14..e898a43f99 100644 --- a/meta-python/recipes-devtools/python/python3-time-machine_3.2.0.bb +++ b/meta-python/recipes-devtools/python/python3-time-machine_3.2.0.bb @@ -26,7 +26,13 @@ do_install_ptest:append() { # instant of a slim tzfile and returns a 0 (UTC) offset, so the epoch maps to # 0 instead of 21600. Python's own zoneinfo reads the same file correctly, so # this is a dateutil/slim-tzdata limitation, not a time_machine bug. - sed -i -e "/--automake/ s|\$| --deselect tests/test_time_machine.py::test_destination_datetime_tzinfo_non_zoneinfo|" \ + # + # test_marker_function/_and_fixture/_class/_module use the "testdir" fixture, + # provided by pytest's builtin pytester plugin. That plugin isn't autoloaded; + # upstream's pyproject.toml sets [tool.pytest.ini_options] addopts = "-p + # pytester", but that file isn't shipped into the ptest tree, so the fixture + # is unavailable and those 4 tests error out. Pass -p pytester directly. + sed -i -e "/--automake/ s|\$| -p pytester --deselect tests/test_time_machine.py::test_destination_datetime_tzinfo_non_zoneinfo|" \ ${D}${PTEST_PATH}/run-ptest }