Why does Bitcoin not use `unittest` framework instead of custom framework? #16121

issue Dentrax opened this issue on May 29, 2019
  1. Dentrax commented at 9:13 PM on May 29, 2019: none

    As we saw, Bitcoin is using a test_framework of its own to testing thousands of cases. All the script files here are using test_framework.

    The main question is: Why instead of use unittest, a special custom test system was written from the beginning? Is there a goal or plan of migrating whole testing system to the unittest?

    Thank you, just wondering... :)

  2. fanquake added the label Tests on May 29, 2019
  3. jnewbery commented at 7:34 PM on May 30, 2019: member

    The tests in /tests/functional are integration tests of the built C++ bitcoind, not python unit tests.

  4. dongcarl closed this on Jun 1, 2019

  5. MarcoFalke commented at 8:44 AM on June 2, 2019: member

    While it could probably be translated to use unittest, a lot of the complexity of the test framwork is how to speak with bitcoind in many ways (startup/shutdown, rpc, p2p, create datadirs). So except for naming differences of some methods, it wouldn't make a huge difference to migrate, I believe. So probably not worth the effort.

  6. MarcoFalke locked this on Dec 16, 2021
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 03:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me