Skip to content

Commit ac7d996

Browse files
test(test_scaffold): expect canonical-path __module__ in scaffolded-connection error log
`TestScaffoldConnectionAndRun::test_run_and_not_implemented_error` expects the agent to log a specific error line when a scaffolded connection's ``connect()`` raises ``NotImplementedError``. The line prints ``repr(type(connection))``, which renders the class's ``__module__``. With this PR, ``Connection.from_config`` registers the loaded connection module under the canonical ``packages.<author>.connections.<name>.connection`` dotted path instead of the bare ``connection_module`` constant. So the class is now ``<class 'packages.default_author.connections.my_con.connection.MyScaffoldAsyncConnection'>`` rather than ``<class 'connection_module.MyScaffoldAsyncConnection'>``. Update the expected string to match. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 277a31c commit ac7d996

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_connections/test_scaffold.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_run_and_not_implemented_error(self):
8888
try:
8989
proc.expect_all(
9090
[
91-
"Error while connecting <class 'connection_module.MyScaffoldAsyncConnection'>: NotImplementedError()"
91+
"Error while connecting <class 'packages.default_author.connections.my_con.connection.MyScaffoldAsyncConnection'>: NotImplementedError()"
9292
],
9393
timeout=50,
9494
)

0 commit comments

Comments
 (0)