updating mechanize - help concerning tests with pybuild
Dmitry Shachnev
mitya57 at debian.org
Sat Aug 31 09:14:03 BST 2019
Hi Norbert,
Let me try answering your second question, about tests.
On Sat, Aug 31, 2019 at 11:33:54AM +0900, Norbert Preining wrote:
> Current mechanize needs to set up a special environment for the tests.
> There is a dedicated script
> run_tests.py
> that would do the trick. I tried to use the pybuild before tests feature
> to export PYTHONPATH, but that didn't work.
>
> Is there a way to run a specific script instead of the built-in tests of
> pybuild?
Something like this should do the trick:
- Add run_tests.py and the tests themselves to debian/pybuild.testfiles,
to make pybuild copy them to the build directory.
- Add override_dh_auto_test target with a command like this:
dh_auto_test -- --system custom --test-args "{interpreter} run_tests.py"
Then pybuild will take care of running the tests with all supported
interpreters, each one in its own directory, and cleaning up after that.
See pybuild(1) for details.
--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-zope-developers/attachments/20190831/b12d78a6/attachment.sig>
More information about the pkg-zope-developers
mailing list