Hi,

On Tue, Jun 04, 2019 at 11:46:52AM +0200, Alexandre Rossi wrote:
> Package: autodep8
> Version: 0.18
> Severity: normal
> 
> Dear Maintainer,
> 
> For django packages, autodep8 fails to determine the proper python module
> name:
> 
> $ autodep8
> Test-Command: set -e ; for py in $(pyversions -r 2>/dev/null) ; do cd 
> "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import 
> django_constance; print django_constance" ; done
> Depends: python-all, python-django-constance
> Restrictions: allow-stderr, superficial
> Features: test-name=autodep8-python2
> 
> Test-Command: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd 
> "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import 
> django_constance; print(django_constance)" ; done
> Depends: python3-all, python3-django-constance
> Restrictions: allow-stderr, superficial
> Features: test-name=autodep8-python3
> 
> The proper tests:
> 
> $ python -c 'import constance'
> $ python3 -c 'import constance'
> 
> Maybe autodep8 should allow the package maintainer to customize the python
> module name. Something has been proposed to fix this:
> https://salsa.debian.org/ci-team/autodep8/merge_requests/6
> 
> Or maybe support/python/generate should handle the special django module case.

This has nothing to do with Django packages. It will fail for any
package where the main module does not match the (upstream) package
name.

This import test is also the very minimal testing that can be done in a
python package. If you care enough about testing to not just delete the
`Testsuite: autopkgtest-pkg-python` field in debian/control, you might
as well enable real tests on the package instead.

Attachment: signature.asc
Description: PGP signature

Reply via email to