Skip to content

Test plugin improvements#9138

Open
rustyrussell wants to merge 3 commits into
ElementsProject:masterfrom
rustyrussell:guilt/test-plugin-improvements
Open

Test plugin improvements#9138
rustyrussell wants to merge 3 commits into
ElementsProject:masterfrom
rustyrussell:guilt/test-plugin-improvements

Conversation

@rustyrussell
Copy link
Copy Markdown
Contributor

Got Claude to neaten Python tests:

  1. Create infra for tests to have a "plugin" inline in the test.
  2. Convert all the simple tests to use that, instead of a separate plugin file.
  3. Normalize all tests to use l1, l2 etc names (matching with directories when trying to debug!) and get_nodes() over get_node (only waits at the end, so is faster).

Changelog-None: tests only

@rustyrussell rustyrussell requested a review from cdecker as a code owner May 15, 2026 05:04
Avoids having to create a special test plugin most of the time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reduces the number of misc test plugins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Replace non-standard node variable names (n, n2, node, ln) with l1/l2
across test_plugin.py and test_misc.py.  Convert four tests in
test_connection.py to use get_nodes() instead of consecutive get_node()
calls with identical options (slightly faster).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rustyrussell rustyrussell force-pushed the guilt/test-plugin-improvements branch from 06fdca4 to 49b3c00 Compare May 18, 2026 12:03
@ddustin
Copy link
Copy Markdown
Collaborator

ddustin commented May 18, 2026

A claude PR that removes as many lines as it adds 😲, nice. Feels much cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants