mirror of
https://github.com/dnet/pySSTV.git
synced 2025-12-06 07:12:00 +01:00
Python 3 uses builtins.open instead of io.open
This commit is contained in:
parent
9cbb0c50ff
commit
81b45e7e4e
|
|
@ -71,7 +71,7 @@ class TestSSTV(unittest.TestCase):
|
|||
bio = BytesIO()
|
||||
bio.close = MagicMock() # ignore close() so we can .getvalue()
|
||||
mock_open = MagicMock(return_value=bio)
|
||||
ns = '__builtin__' if PY2 else 'io'
|
||||
ns = '__builtin__' if PY2 else 'builtins'
|
||||
with mock.patch('{0}.open'.format(ns), mock_open):
|
||||
self.s.write_wav('unittest.wav')
|
||||
expected = 'dd7eed880ab3360fb79ce09c469deee2'
|
||||
|
|
|
|||
Loading…
Reference in a new issue