Opened 10 years ago

Closed 10 years ago

#21720 closed Bug (fixed)

python manage.py test fails with empty test label

Reported by: Preston Timmons Owned by: Preston Timmons
Component: Testing framework Version: dev
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The bug fix in #21206 introduced a new bug.

When python manage.py test is run without test labels the is_discoverable function raises a TypeError.

TypeError: relative imports require the 'package' argument

Test labels are set to "." when not specified.

This can be reproduced by running the tests with a new project from django-admin.py

Change History (4)

comment:1 by Claude Paroz, 10 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz, 10 years ago

Easy pickings: set

The fix should be rather easy, probably special-casing label == '.' in is_discoverable.

comment:3 by Preston Timmons, 10 years ago

comment:4 by Claude Paroz, 10 years ago

Resolution: fixed
Status: newclosed

(Sorry, wrong ticket number in real commit message)

In 18d962f2e6cc8829d60d6f6dfb3ee3855fa5362e:

Fixed #21206 -- Fixed test discovery without labels

Added test to verify an empty label performs discovery on the current
working directory.
Note: See TracTickets for help on using tickets.
Back to Top