def client_regtest_scrubbed( client_regtest: ClientRegression, ) -> Iterator[Client]: """One node with protocol alpha, regression test and scrubbing enabled.""" register_converter_pre(utils.client_output_converter) yield client_regtest deregister_converter_pre(utils.client_output_converter)
def client_regtest(client_regtest_bis, regtest): """The client for one node with protocol alpha, with a function level regression test fixture.""" deregister_converter_pre(_std_conversion) client_regtest_bis.set_regtest(regtest) register_converter_pre(utils.client_always_output_converter) yield client_regtest_bis deregister_converter_pre(utils.client_always_output_converter)
def client_regtest_custom_scrubber(client_regtest: ClientRegression, request) -> Iterator[Client]: """One node with protocol alpha, regression test and custom scrubbing. The custom scrubbing is configured by in direct parameterization. For example, to replace all `foo` with `bar` and `baz` to `gaz`: @pytest.mark.parametrize('client_regtest_custom_scrubber', [ [(r'foo', 'bar'), (r'baz', 'gaz')] ], indirect=True)""" def scrubber(string): print(request.param) return utils.suball(request.param, string) register_converter_pre(scrubber) yield client_regtest deregister_converter_pre(scrubber)