Opened 3 months ago

Closed 3 months 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, 3 months ago

Has patch: set

comment:2 by Claude Paroz, 3 months ago

Component: UncategorizedTesting framework
Triage Stage: UnreviewedReady for checkin

Thanks for noticing!

comment:3 by GitHub <noreply@…>, 3 months 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