#1077645 autodep8: should make it possible to have the coverage of both -pkg-python and -pkg-pybuild

#1077645#5
Date:
2024-07-31 09:00:34 UTC
From:
To:
autodep8 has two modes for testing Python modules:

1. "Testsuite: autopkgtest-pkg-python" generates a simple smoke-test:
   install python3-foo and its mandatory dependencies, run 'import foo'
   and assert that it succeeds.

2. "Testsuite: autopkgtest-pkg-pybuild" generates a more elaborate
   test: install python3-foo and also the build-dependencies of the source
   package, and attempt to run the upstream test suite against the
   installed python3-foo.

   This must install the full build-dependencies, because in general the
   upstream test suite will require additional packages beyond the
   mandatory dependencies of python3-foo: either test infrastructure like
   pytest, or dependencies of optional features. For example python3-tap
   `Recommends: python3-more-itertools, python3-yaml`, but does not depend
   on them, because they are only needed for some (rare) features; but
   running the upstream test suite *requires* those extra modules.

The Python team is discussing making (2.) mandatory, or at least strongly
recommended. However, for packages that are already using (1.), this loses
some test coverage: we would no longer be verifying that the package's
mandatory dependencies are enough to import it!

Ideally we would have a way to do (1.) *and* (2.). Perhaps
Testsuite: autopkgtest-pkg-pybuild could generate both tests, either always
or with some mechanism to opt-in?

A workaround is to handle one of (1.) or (2.) automatically, and hard-code
the test that would be generated by the other one into debian/tests/control
(but that seems undesirable, because the whole point of autodep8 is to be
able to change these generated test definitions centrally without having to
re-upload every package).

    smcv

#1077645#10
Date:
2024-07-31 09:57:53 UTC
From:
To:
It looks as though
"Testsuite: autopkgtest-pkg-python, autopkgtest-pkg-pybuild"
is meant to do that, but doesn't currently work (#1042717 and/or #1061620).

    smcv

#1077645#15
Date:
2024-08-01 05:50:37 UTC
From:
To:
Hi,

A bit ugly, but something that probably works today is to have both in
the "Testsuite: " line.

Paul

#1077645#20
Date:
2024-08-01 05:51:37 UTC
From:
To:
Sorry for the noise of my previous mail

... indeed.

Paul

#1077645#25
Date:
2026-01-10 10:10:41 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.