def test_unsupported_not_forwarded():
class FakeFile(io.RawIOBase):
def unsupported_attr(self): # pragma: no cover
pass
async_file = trio.wrap_file(FakeFile())
assert hasattr(async_file.wrapped, 'unsupported_attr')
with pytest.raises(AttributeError):
getattr(async_file, 'unsupported_attr')
评论列表
文章目录