Closed Bug 876792 Opened 11 years ago Closed 11 years ago

Add TemporaryDirectory to mozfile

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ted, Assigned: ted)

Details

Attachments

(1 file)

I have this TemporaryDirectory context manager helper I've written previously:
http://mxr.mozilla.org/mozilla-central/source/testing/runcppunittests.py#15

I think it'd be useful to have in mozfile.
Attachment #754916 - Flags: review?(jhammel)
Comment on attachment 754916 [details] [diff] [review]
add mozfile.TemporaryDirectory

Looks great! thanks!
Attachment #754916 - Flags: review?(jhammel) → review+
Pushed:
https://github.com/mozilla/mozbase/commit/4e7277b0df0a8b5a453586c25f234011b4f3ef83

Apparently this made Python 3.2, so we could probably attempt to import it from tempfile if we wanted to be forward-compat:
http://docs.python.org/dev/library/tempfile.html#tempfile.TemporaryDirectory
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: