Commit Graph

14 Commits

Author SHA1 Message Date
Jack Grigg c592bf7da0 python: Use UTF-8 encodings for opened files 2021-04-14 13:19:33 +12:00
John Newbery e289f812d2 Improve logging in bctest.py if there is a formatting mismatch 2020-10-28 16:20:53 +00:00
John Newbery abd7840c22 Clean up bctest.py and bitcoin-util-test.py
- remove newlines
- change tabs for spaces, to align with convention in other py files
- add comments
- add 'Bitcoin Core Developers' copyright notice
2020-10-28 16:20:53 +00:00
jnewbery 5508f14437 Add logging to bitcoin-util-test.py
- Use the python standard logging library
- Run all tests and report all failing test-cases (rather than stop after one test case fails)
- If output is different from expected output, log a contextual diff.
2020-10-28 16:20:53 +00:00
Wladimir J. van der Laan 3e2460b6f8 test: Add format-dependent comparison to bctest
This splits the output comparison for `bitcoin-tx` into two steps:

- First, check for data mismatch, parsing the data as json or hex
  depending on the extension of the output file

- Then, check if the literal string matches

For either of these cases give a different error.

This prevents wild goose chases when e.g. a trailing space doesn't match
exactly, and makes sure that both test output and examples are valid
data of the purported format.
2020-10-28 16:20:53 +00:00
jnewbery 2079d495f6 add verbose mode to bitcoin-util-test.py 2020-10-28 16:07:25 +00:00
jnewbery e9c1703ba6 bitcoin-util-test.py should fail if the output file is empty 2020-10-28 16:07:25 +00:00
Daira Hopwood bc909a7a7f Replace http with https: in links to the MIT license.
Also change MIT/X11 to just MIT, since no distinction was intended.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
Jack Grigg b466c1c90c
cleanup: Ensure code is pyflakes-clean for CI 2018-03-27 02:47:57 +02:00
Michael Ford 78253fcbad Remove references to X11 licence 2014-12-16 15:56:50 +08:00
Cory Fields 41d67c78bf tests: fix python test-runner for windows
Windows needed a few fixups to get the tests running:
1. bitcoin-tx needs a file extension in Windows. Take this opportunity to
   add an env file, which pulls variables out of our build config. This can
   be extended as needed, for now it's very simple.
2. After #1, split the args out of the exec key in the test data.
3. Correct the line-endings from windows stdout
2014-09-30 16:26:22 -04:00
Jeff Garzik df4d61e681 Add bitcoin-tx tests
Testing: delin, delout, locktime, and basic createrawtransaction-like
functionality.
2014-08-19 23:15:58 -04:00
Jeff Garzik fb14452c6c bitcoin-tx: Accept input via stdin. Add input handling to tests. 2014-08-19 10:29:10 -04:00
Jeff Garzik d789386371 Add "it works" test for bitcoin-tx 2014-08-19 10:28:58 -04:00