Skip to content
Snippets Groups Projects
Verified Commit 3f474c03 authored by Mateusz Żebrak's avatar Mateusz Żebrak
Browse files

Do not force argumentparses in non-pytest .py scripts that use test-tools

Rationale:
- we already have a way of setting executable paths and we do it
  by specyfying the environment variables.
- in .py scripts using test-tools it causes problems when this script
  defines it's own ArgumentParser. In such a situation test-tools parser
  takes precedence and overrides the one which user defined in its .py
  script.

  Example:
  usage: testnet_node.py [-h] [--build-root-path BUILD_ROOT] [--hived-path HIVED] [--cli-wallet-path CLI_WALLET] [--get-dev-key-path GET_DEV_KEY] [--compress-block-log-path COMPRESS_BLOCK_LOG]

  options:
    -h, --help            show this help message and exit
    --build-root-path BUILD_ROOT
    --hived-path HIVED
    --cli-wallet-path CLI_WALLET
    --get-dev-key-path GET_DEV_KEY
    --compress-block-log-path COMPRESS_BLOCK_LOG

  Before the test-tools integration with helpy it was possible
  to workaround this situatiog (in a ugly way although) by calling .py
  script .parse_args() before importing test-tools.

  I believe that this functionality is unnecessary from the above point
  and only generates problems. The use of test-tools should not overwrite
  the cli parser argument in the .py script which uses them.
parent 9db2fe21
No related branches found
No related tags found
1 merge request!184Do not force CLI ArgumentParser in non-pytest .py scripts that use test-tools
Pipeline #83379 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment