You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the tests verifies the exact text of an exception matches a string literal; however, 3.12 changed that text, so it no longer matches.
=================================== FAILURES ===================================
_________________________ TestConfig.test_load_invalid _________________________
self = <tests.test_receive.TestConfig object at 0x7f307b6562d0>
tmp_path = PosixPath('/tmp/pytest-of-user42/pytest-19/test_load_invalid0')
def test_load_invalid(self, tmp_path):
with pytest.raises(receive.OTReceiveConfigError) as excinfo:
receive.OTReceiveConfig.load([True])
> assert str(excinfo.value) == (
'expected str, bytes or os.PathLike object, not bool'
)
E assert "argument sho...r, not 'bool'" == 'expected str...ect, not bool'
E - expected str, bytes or os.PathLike object, not bool
E + argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'bool'
tests/test_receive.py:818: AssertionError
It would be great if the could be fixed in a manner preserving compatibility with the earlier Python versions as well.
The text was updated successfully, but these errors were encountered:
Ah, that was silly to match the whole exception string. I think this can be changed to a simple match on PathLike since that's all it's trying to determine and I feel like that's less likely to change.
On Python 3.12 the `pathlib.Path()` exception string has changed to
`argument should be a str or an os.PathLike object where __fspath__
returns a str, not 'bool'`. Matching the whole exception string was
never a great idea, but it seems like `PathLike` will always be in it
somewhere.
Fixes: #16
One of the tests verifies the exact text of an exception matches a string literal; however, 3.12 changed that text, so it no longer matches.
It would be great if the could be fixed in a manner preserving compatibility with the earlier Python versions as well.
The text was updated successfully, but these errors were encountered: