Closed Bug 1706115 Opened 4 years ago Closed 4 years ago

unexpected keywork argument 'errors' when running tests locally

Categories

(Testing :: Python Test, defect)

Default
defect

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

The Python 3.9 logging module passes the errors parameter to open(), which is not handled by our mock. Error from running ./mach python-test python/mozbuild/mozbuild/test/configure/test_configure.py:

 0:02.86 self = <FileHandler /home/sfink/src/mozilla3/config.log (NOTSET)>
 0:02.86 
 0:02.86     def _open(self):
 0:02.87         """
 0:02.87             Open the current base file with the (original) mode and encoding.
 0:02.87             Return the resulting stream.
 0:02.87             """
 0:02.87 >       return open(self.baseFilename, self.mode, encoding=self.encoding,
 0:02.87                     errors=self.errors)
 0:02.87 E       TypeError: __call__() got an unexpected keyword argument 'errors'
 0:02.87 
 0:02.87 /usr/lib64/python3.9/logging/__init__.py:1171: TypeError
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14010706f471 add encoding errors=... param to mozunit mocked open() r=ahal
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2e88334b975 add encoding errors=... param to mozunit mocked open() r=ahal
Flags: needinfo?(sphink)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: