Issue Details

Number
31131
Title
TestFramework: TestShell.reset() will always fail
Description
[TestShell documentation](https://github.com/bitcoin/bitcoin/blob/28ce159bc327e6dfec34077ff2e379b23a95db65/test/functional/test-shell.md?plain=1#L167) mentions a `TestShell.reset()` method. When experimenting with it, it will always fail with: ``` Traceback (most recent call last): File "/Users/jose.edil/2-development/bitcoin/vinteum/foss-program/infra-signet-server/signet-server.py", line 169, in <module> TestShell().reset() File "/Users/jose.edil/2-development/bitcoin/bitcoin-core-build/test/functional/test_framework/test_shell.py", line 64, in reset super().__init__() TypeError: BitcoinTestFramework.__init__() missing 1 required positional argument: 'test_file' ``` Indeed, inspecting the [source code](https://github.com/bitcoin/bitcoin/blob/28ce159bc327e6dfec34077ff2e379b23a95db65/test/functional/test_framework/test_shell.py#L59-L64), we see that `TestShell` is a wrapper class for `BitcoinTestFramework`. `TestShell.reset()` will call `super().__init__()` which refers to `BitcoinTestFramework.__init__()`. But we only have `def __init__(self, test_file) -> None:` which will require a mandatory `test_file` parameter. (https://github.com/bitcoin/bitcoin/blob/28ce159bc327e6dfec34077ff2e379b23a95db65/test/functional/test_framework/test_framework.py#L95C5-L95C43). Not sure if `TestShell.reset()` should change to receive this parameter and pass along to the `__init__()` function it calls internally or any other workaround. In my specific case, I can't see what I can pass as `test_file`.
URL
https://github.com/bitcoin/bitcoin/issue/31131
Closed by
Back to List