dash/test/functional/test_framework
MarcoFalke 9f4f52ae4e
Merge #13054: tests: Enable automatic detection of undefined names in Python tests scripts. Remove wildcard imports.
68400d8b96 tests: Use explicit imports (practicalswift)

Pull request description:

  Enable automatic detection of undefined names in Python tests scripts. Remove wildcard imports.

  Wildcard imports make it unclear which names are present in the namespace, confusing both readers and many automated tools.

  An additional benefit of not using wildcard imports in tests scripts is that readers of a test script then can infer the rough testing scope just by looking at the imports.

  Before this commit:

  ```
  $ contrib/devtools/lint-python.sh | head -10
  ./test/functional/feature_rbf.py:8:1: F403 'from test_framework.util import *' used; unable to detect undefined names
  ./test/functional/feature_rbf.py:9:1: F403 'from test_framework.script import *' used; unable to detect undefined names
  ./test/functional/feature_rbf.py:10:1: F403 'from test_framework.mininode import *' used; unable to detect undefined names
  ./test/functional/feature_rbf.py:15:12: F405 bytes_to_hex_str may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util
  ./test/functional/feature_rbf.py:17:58: F405 CScript may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util
  ./test/functional/feature_rbf.py:25:13: F405 COIN may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util
  ./test/functional/feature_rbf.py:26:31: F405 satoshi_round may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util
  ./test/functional/feature_rbf.py:26:60: F405 COIN may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util
  ./test/functional/feature_rbf.py:30:41: F405 satoshi_round may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util
  ./test/functional/feature_rbf.py:30:68: F405 COIN may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util
  $
  ```

  After this commit:

  ```
  $ contrib/devtools/lint-python.sh | head -10
  $
  ```

Tree-SHA512: 3f826d39cffb6438388e5efcb20a9622ff8238247e882d68f7b38609877421b2a8e10e9229575f8eb6a8fa42dec4256986692e92922c86171f750a0e887438d9
2021-07-06 20:29:33 +03:00
..
__init__.py
address.py Partial merge #8499: Add several policy limits and disable uncompressed keys for segwit scripts 2021-06-05 22:12:55 +03:00
authproxy.py
bignum.py
blocktools.py Merge #13669: Tests: Cleanup create_transaction implementations 2021-07-06 20:29:31 +03:00
coverage.py
key.py Partial merge #8499: Add several policy limits and disable uncompressed keys for segwit scripts 2021-06-05 22:12:55 +03:00
messages.py Merge #13915: [qa] Add test for max number of entries in locator 2021-07-06 20:29:31 +03:00
mininode.py Merge #13054: tests: Enable automatic detection of undefined names in Python tests scripts. Remove wildcard imports. 2021-07-06 20:29:33 +03:00
netutil.py Merge #13963: tests: Replace usage of tostring() with tobytes() 2021-07-01 16:33:23 -05:00
script.py Merge #13054: tests: Enable automatic detection of undefined names in Python tests scripts. Remove wildcard imports. 2021-07-06 20:29:33 +03:00
siphash.py
socks5.py
test_framework.py Merge #13944: test: Port usage of deprecated optparse module to argparse module 2021-07-06 20:29:32 +03:00
test_node.py Merge #13867: qa: Make extended tests pass on native Windows 2021-07-06 20:29:31 +03:00
util.py Merge #13669: Tests: Cleanup create_transaction implementations 2021-07-06 20:29:31 +03:00