Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18877 closed Uncategorized (invalid)

Selecting app for testing - dot in app name

Reported by: rrafal@… Owned by: nobody
Component: Testing framework Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I'm trying to execute the following command:
python test django.contrib.auth

I'm getting this message:
App with label django could not be found

When searching the tests, django assumes that the app has no dot "." in the name. I believe the assumption is too strict and unnecessary. I'm using django 1.4.1

I run into this problem because my own apps include dot in the name.

Change History (2)

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

From Django's point of view, the app isn't called "django.contrib.auth"; it's called "auth" -- only the last part of the dotted name is used. If you want to run the test suite for auth, you should use

./ test auth

This is something that is quite deep ingrained in the application loading infrastructure, so it isn't really plausible to change it.

comment:2 Changed 3 years ago by anonymous

I was not aware that apps were give shorter names like that. Thank you for the explanation. Everything works again!

Note: See TracTickets for help on using tickets.
Back to Top