Closed
Bug 872138
Opened 12 years ago
Closed 12 years ago
mozfile.NamedTemporaryFile API updates
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: k0scist, Assigned: k0scist)
References
Details
Attachments
(1 file)
4.38 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
From https://bugzilla.mozilla.org/show_bug.cgi?id=790765#c35 and
https://bugzilla.mozilla.org/show_bug.cgi?id=790765#c36 :
New file APIs are needed for mozfile.NamedTemporaryFile:
- should be (line) iterable (i.e. a generator with __iter__ and next
in the ususal way
- should take delete=False
Relevent tracebacks:
======================================================================
ERROR: test_schema_version (bug785146.PermissionsTest)
----------------------------------------------------------------------
Traceback (most recent call last): File
"/home/jhammel/mozilla/src/mozilla-central/testing/mozbase/mozprofile/tests/bug785146.py",
line 41, in test_schema_version perms.write_db(self.locations_file)
File
"/home/jhammel/mozilla/src/mozilla-central/testing/mozbase/mozprofile/mozprofile/permissions.py",
line 247, in write_db for location in locations: TypeError:
'NamedTemporaryFile' object is not iterable
----------------------------------------------------------------------
======================================================================
ERROR: test_prefs_write (test_preferences.PreferencesTest) test that
the Preferences.write() method correctly serializes preferences
----------------------------------------------------------------------
Traceback (most recent call last): File
"/home/jhammel/mozilla/src/mozilla-central/testing/mozbase/mozprofile/tests/test_preferences.py",
line 237, in test_prefs_write with
mozfile.NamedTemporaryFile(suffix='.js', delete=False) as f:
TypeError: __init__() got an unexpected keyword argument 'delete'
Assignee | ||
Comment 1•12 years ago
|
||
Following this (and ensuring m-c is okay) this should be version bumped and mirrored to m-c for bug 790765
Assignee | ||
Comment 2•12 years ago
|
||
Found https://bugzilla.mozilla.org/show_bug.cgi?id=872230 while working. Luckily, I don't think we care about it for this bug.
Assignee | ||
Comment 3•12 years ago
|
||
a version bump and mirroring (possibly to be done with other code) is still needed following checkin
Attachment #749497 -
Flags: review?(jgriffin)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → jhammel
Comment 4•12 years ago
|
||
Comment on attachment 749497 [details] [diff] [review]
fix these things
Review of attachment 749497 [details] [diff] [review]:
-----------------------------------------------------------------
cool, lgtm!
Attachment #749497 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•12 years ago
|
||
Will bump mozfile -> 0.7 for this
Assignee | ||
Comment 7•12 years ago
|
||
bumped, tagged, ->pypi'ed: https://github.com/mozilla/mozbase/commit/b90a02a2c6a26aed9182f32bddad75bbb187e05c
You need to log in
before you can comment on or make changes to this bug.
Description
•