On Tue, Oct 03, 2023 at 11:52:58PM +0100, Carles Pina i Estany wrote: > > upstream tests. Though I think it won't see your explicit `pytest -k` and > > you should replace the override with a PYBUILD_TEST_ARGS var. > > Done this way: > https://salsa.debian.org/python-team/packages/python-cloudscraper/-/commit/78a83fbb0fe5fdfba78136921b919a11c8c9bc43 Now you don't need to override dh_auto_test, it should call pytest with correct args automatically.
> pytest, as run automatically when having "Testsuite: > autopkgtest-pkg-pybuild": runs in the directory > "/tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build" doing > "python3.11 -m pytest -k ...". > > The contents of the directory via "ls -l" can be seen here: > https://salsa.debian.org/carlespina/python-cloudscraper/-/jobs/4766353#L357) This gives 404. > Because there is the sub-directory > /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraper It shouldn't be there. > : for what I can tell, pytest is running the tests with the code from > /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraper > and not the installed package in > /usr/lib/python3/dist-packages/cloudscraper/ . Generally speaking, I > prefer to use the installed code (as done via the basic "import"). Sure, autopkgtests need to use the installed code.