Code

#20714 closed Cleanup/optimization (wontfix)

Add a more informative error message when runtests fails to import from test suite directory

Reported by: anonymous Owned by: nobody
Component: Utilities Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

When trying to run the test suite after updating my repo, I was getting strange ImportErrors. It turned out there were orphaned empty directories in the tests directory. A small change that prints a hint when that happens would help avoid confusion for new and less regular contributors.

A pull request for this is available here:
https://github.com/django/django/pull/1342

Attachments (0)

Change History (1)

comment:1 Changed 12 months ago by timo

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

Comments from the pull request:

Marc: "I'm fairly confident that this isn't the only reason an exception could be raised on that line. It's probably a hangover from the one-off major refactor of how the test suite is structured which shouldn't impact too many people."

me: "I agree with Marc. You can use a git post-checkout hook to automatically delete empty directories. Added the tip here: https://code.djangoproject.com/wiki/CommitterTips"

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.