Opened 10 years ago

Closed 10 years ago

#22056 closed Cleanup/optimization (fixed)

Empty directories shouldn't be included to test modules

Reported by: sebastian.pawlus@… Owned by: nobody
Component: Testing framework Version: 1.7-alpha-1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently empty directories are included to the tests modules. It's incredibly annoying especially when switching branches and git leaves empty directories.

To reproduce just create an empty directory inside django/tests/

Change History (5)

comment:2 by Tim Graham, 10 years ago

This may be find. Personally, I use a post-checkout hook:

# Delete .pyc files and empty directories.
find . -name "*.pyc" -delete
find . -type d -empty -delete

We could at least document that if there's any drawback to the PR.

comment:3 by AeroNotix, 10 years ago

Type: UncategorizedCleanup/optimization

comment:4 by Claude Paroz, 10 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

comment:5 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 4622d23ccf50a72432ff0c7416a4d6e0789c4f0b:

Fixed #22056 -- Omitted non-package directories when collecting tests

This allows us to ignore empty dirs or other unrelated dirs.
Thanks Sebastian Pawluś for the report and the initial patch.

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