lbrycrd/test/functional/test_framework
MarcoFalke 76b3349159
Merge #11468: [tests] Make comp test framework more debuggable
748157913 [tests] Make comp test framework more debuggable (John Newbery)

Pull request description:

  We should remove the comparison test framework entirely (see #10603).

  Until we do that, let's make it a bit more debuggable. Currently, if there's an assert in the framework, it's very difficult to track down where we are in the test generator. Make the logging a bit better to help with debugging.

  Before this PR:

  ```
  → ./p2p-fullblocktest.py
  2017-10-09 14:05:11.302000 TestFramework (INFO): Initializing test directory /tmp/user/1000/testzdnax_yr
  2017-10-09 14:05:11.557000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:11975
  2017-10-09 14:05:11.712000 TestFramework.comptool (INFO): Test 1: PASS
  2017-10-09 14:05:11.947000 TestFramework.comptool (INFO): Test 2: PASS
  2017-10-09 14:05:12.057000 TestFramework.comptool (INFO): Test 3: PASS
  2017-10-09 14:05:12.058000 TestFramework (ERROR): Assertion failed
  Traceback (most recent call last):
    File "/home/ubuntu/bitcoin/test/functional/test_framework/test_framework.py", line 117, in main
      self.run_test()
    File "./p2p-fullblocktest.py", line 72, in run_test
      self.test.run()
    File "/home/ubuntu/bitcoin/test/functional/test_framework/comptool.py", line 306, in run
      assert test_number != 4
  AssertionError
  2017-10-09 14:05:12.059000 TestFramework (INFO): Stopping nodes
  2017-10-09 14:05:14.203000 TestFramework (WARNING): Not cleaning up dir /tmp/user/1000/testzdnax_yr
  2017-10-09 14:05:14.204000 TestFramework (ERROR): Test failed. Test logging available at /tmp/user/1000/testzdnax_yr/test_framework.log
  ```

  With this PR:

  ```
  → ./p2p-fullblocktest.py
  2017-10-09 14:03:54.069000 TestFramework (INFO): Initializing test directory /tmp/user/1000/testuey7t3tf
  2017-10-09 14:03:54.329000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:11783
  2017-10-09 14:03:54.383000 TestFramework.comptool (INFO): Running test 1: ./p2p-fullblocktest.py line 184
  2017-10-09 14:03:54.496000 TestFramework.comptool (INFO): Running test 2: ./p2p-fullblocktest.py line 193
  2017-10-09 14:03:54.758000 TestFramework.comptool (INFO): Running test 3: ./p2p-fullblocktest.py line 205
  2017-10-09 14:03:54.867000 TestFramework.comptool (INFO): Running test 4: ./p2p-fullblocktest.py line 208
  2017-10-09 14:03:54.867000 TestFramework (ERROR): Assertion failed
  Traceback (most recent call last):
    File "/home/ubuntu/bitcoin/test/functional/test_framework/test_framework.py", line 117, in main
      self.run_test()
    File "./p2p-fullblocktest.py", line 72, in run_test
      self.test.run()
    File "/home/ubuntu/bitcoin/test/functional/test_framework/comptool.py", line 309, in run
      assert test_number != 4
  AssertionError
  2017-10-09 14:03:54.868000 TestFramework (INFO): Stopping nodes
  2017-10-09 14:03:56.950000 TestFramework (WARNING): Not cleaning up dir /tmp/user/1000/testuey7t3tf
  2017-10-09 14:03:56.950000 TestFramework (ERROR): Test failed. Test logging available at /tmp/user/1000/testuey7t3tf/test_framework.log
  ```

Tree-SHA512: 5525958b0098d661c281bd955c92c72bf81359464376e96d44e6c88f18aea57ba08270ecd564edda4b47d674e3b27d20e5b1060544bf8dd5c6a68103d2bb35b8
2017-11-10 10:08:24 -05:00
..
__init__.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
address.py Use BIP173 addresses in segwit.py test 2017-09-28 17:29:01 -07:00
authproxy.py [tests] Don't subclass from object for Python 3 2017-10-16 21:46:23 -04:00
bignum.py Remove unused variables and/or function calls 2017-08-28 15:18:14 +02:00
blockstore.py Have SegWit active by default 2017-11-06 19:29:20 -08:00
blocktools.py Tests: Refactor to create witness script creation function 2017-04-20 11:28:45 -07:00
comptool.py Merge #11468: [tests] Make comp test framework more debuggable 2017-11-10 10:08:24 -05:00
coverage.py [tests] Don't subclass from object for Python 3 2017-10-16 21:46:23 -04:00
key.py [tests] Don't subclass from object for Python 3 2017-10-16 21:46:23 -04:00
mininode.py [tests] Explicitly disallow support for p2p versions below 60001 2017-11-08 15:43:45 -05:00
netutil.py Remove unused variables and/or function calls 2017-08-28 15:18:14 +02:00
script.py [tests] Don't subclass from object for Python 3 2017-10-16 21:46:23 -04:00
segwit_addr.py Use BIP173 addresses in segwit.py test 2017-09-28 17:29:01 -07:00
siphash.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
socks5.py [tests] Don't subclass from object for Python 3 2017-10-16 21:46:23 -04:00
test_framework.py Merge #11472: qa: Make tmpdir option an absolute path, misc cleanup 2017-10-18 16:52:48 +02:00
test_node.py [tests] Add p2p connection to TestNode 2017-11-08 09:04:02 -05:00
util.py scripted-diff: rename assert_raises_jsonrpc to assert_raises_rpc error 2017-10-05 09:57:19 -04:00