fix(micromate): is_open() called a property -- TypeError on every real transport
Hidden because the test double defined is_connected as a method; it is now a property, matching BaseTransport. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
8eab5f9479
commit
31181f64e6
3 files changed
+19
-4
No files matched your search
+4
-1
@@ -128,7 +128,10 @@ class MicromateClient:
|
||||
self._transport.disconnect()
|
||||
|
||||
def is_open(self) -> bool:
|
||||
return self._transport.is_connected()
|
||||
# `is_connected` is a PROPERTY on BaseTransport. Calling it raised
|
||||
# TypeError on every real transport; only a test double that defined
|
||||
# it as a method hid that.
|
||||
return bool(self._transport.is_connected)
|
||||
|
||||
def __enter__(self) -> "MicromateClient":
|
||||
self.open()
|
||||
|
||||
Reference in new issue
Block a user