Opened 4 weeks ago

Closed 4 weeks ago

#35695 closed Cleanup/optimization (fixed)

Running tests leaves empty unused directory behind

Reported by: Hisham Mahmood Owned by: Hisham Mahmood
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Running ./runtests.py model_fields.test_filefield.FileFieldTests.test_delete_content_file actually creates a file on disk and then deletes it leaving an empty unused/ directory behind. No other tests in model_fields.test_filefield.FileFieldTests create any files on disk.

I suggest that we move this to a temporary folder like done in https://github.com/django/django/pull/18396 but for model_fields instead of model_forms

Change History (3)

comment:1 by Hisham Mahmood, 4 weeks ago

Has patch: set

comment:2 by Claude Paroz, 4 weeks ago

Component: UncategorizedTesting framework
Triage Stage: UnreviewedReady for checkin

Thanks for noticing!

comment:3 by GitHub <noreply@…>, 4 weeks ago

Resolution: fixed
Status: assignedclosed

In 51908781:

Fixed #35695 -- Ensured FileFields use a storage pointing to a temp directory in model_fields tests.

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