Thank you very much for taking the time to look into this Ben. On Tue, Feb 18, 2025 at 1:08 PM Ben Beasley <code@xxxxxxxxxxxxxxxxxx> wrote: > > I gather that you have already found that this will work for the > import-only "smoke test": > > # Make sure everything is at least importable. Skip > # inputremapper.bin.input_remapper_gtk because it requires a display. > %pyproject_check_import -e inputremapper.bin.input_remapper_gtk I did, thanks to Karolina. > > I spent a little time attempting an update to input-remapper 2.1.1 > locally. I think that errors like > > _________________________ ERROR at setup of test_setup > _________________________ > file > /builddir/build/BUILD/input-remapper-2.1.1-build/input-remapper-2.1.1/tests/lib/test_setup.py, > line 33 > def test_setup(cls): > E fixture 'cls' not found > > available fixtures: cache, capfd, capfdbinary, caplog, > capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, > record_property, record_testsuite_property, record_xml_attribute, recwarn, > tmp_path, tmp_path_factory, tmpdir, tmpdir_factory > > use 'pytest --fixtures [testpath]' for help on them. > > /builddir/build/BUILD/input-remapper-2.1.1-build/input-remapper-2.1.1/tests/lib/test_setup.py:33 > > suggest upstream has accidentally made the tests incompatible with > pytest as a runner, because test_setup looks like pytest's "magic > syntax" for a test with a fixture. That’s unfortunate, because using > pytest as the test runner allowed us to skip known failing tests easily > by adding command-line options, while skipping an individual test with > unittest requires patching the test source to add a decorator. That is really a lot of work, I'm curious to see what other distros will do about it (I strongly suspect they will just disable testing). > Still, I thought it was worth trying to run the tests closer to the way > upstream does in .github/workflows/test.yml. > > %{py3_test_envvars} %{python3} -m unittest discover tests/unit > > Unfortunately, I still see a wall of errors like > > ====================================================================== > ERROR: test_autoload (test_config.TestConfig.test_autoload) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/builddir/build/BUILD/input-remapper-2.1.1-build/input-remapper-2.1.1/tests/lib/test_setup.py", > line 79, in setUp > patch.start() > ~~~~~~~~~~~^^ > File "/usr/lib64/python3.13/unittest/mock.py", line 1652, in start > result = self.__enter__() > File "/usr/lib64/python3.13/unittest/mock.py", line 1474, in > __enter__ > raise RuntimeError("Patch is already started") > RuntimeError: Patch is already started > > I really don’t have any immediate insight into why that is happening. > > It’s a shame to disable the tests altogether, because this package has > extensive test coverage and they serve as a very useful early warning of > incompatibilities with new Python interpreter versions, system > libraries, and so on. However, running tests is a "should," not a "must" > (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests), > and it looks like the difficulty of getting them working in the current > release is high enough that simply omitting the tests would be > justifiable. You’ll want to maintain the %pyproject_check_import "smoke > test," of course. That is what I ended up doing and it is indeed unfortunate, we don't have that many packages with so thorough testing. I will get in touch with upstream about a couple of regressions and I will bring up the issues with the tests when I do. Do you want me to cc you in the discussion? Best regards, A. P.S.: the source file for the update was already in the lookaside cache when I tried to upload it. Is there a way to see how it got there? -- _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue