Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #12371
| From | Sao I Kuan <saoikuan@gmail.com> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: Questions about including tests/ directory into package |
| Date | 2020-03-20 12:30 +0100 |
| Message-ID | <zMo0F-oY-5@gated-at.bofh.it> (permalink) |
| References | <zLWQO-zz-3@gated-at.bofh.it> <zM7Cx-734-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Mar 20, 2020 at 2:38 AM Diane Trout <diane@ghic.org> wrote: > The way I solved that problem in a similar package was this > > Test-Command: set -e > ; for py in $(py3versions -r 2>/dev/null) > ; do cd tests > ; echo "Testing with $py in $(pwd):" > ; http_proxy= $py -m pytest -v --pyargs > ; done > Depends: @, python3-all, python3-pytest > > The goal of autopkgtests is to test the installed package, when > autopkgtest starts running it defaults to starting in the extracted > copy of the source package. > > The goal is to make sure you test the copy in /usr/lib/python*/dist- > packages. So I assumed if cd-ed into the tests directory the package > source module wouldn't be available to the test runner. > > I did make the assumption that none of the tests messed with the python > path to look in the parent directory... Thanks, Diane. I tried with your given example, it really helped. A lot of appreciates. Thanks for your kind and deep explanation. Sincerely, Sao I Kuan saoikuan@gmail.com
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Questions about including tests/ directory into package Sao I Kuan <saoikuan@gmail.com> - 2020-03-19 07:30 +0100
Re: Questions about including tests/ directory into package Diane Trout <diane@ghic.org> - 2020-03-19 19:00 +0100
Re: Questions about including tests/ directory into package Sao I Kuan <saoikuan@gmail.com> - 2020-03-20 12:30 +0100
Re: Questions about including tests/ directory into package Sandro Tosi <morph@debian.org> - 2020-03-21 00:50 +0100
csiph-web