6 Commits

Author SHA1 Message Date
MarcoFalke
fae612424b contrib: Remove confusing and redundant encoding from IO
The encoding arg is confusing, because it is not applied consistently
for all IO.

Also, it is useless, as the majority of files are ASCII encoded, which
are fine to encode and decode with any mode.

Moreover, UTF-8 is already required for most scripts to work properly,
so setting the encoding twice is redundant.

So remove the encoding from most IO. It would be fine to remove from all
IO, however I kept it for two files:

* contrib/asmap/asmap-tool.py: This specifically looks for utf-8
  encoding errors, so it makes sense to sepecify the utf-8 encoding
  explicitly.
* test/functional/test_framework/test_node.py: Reading the debug log in
  text mode specifically counts the utf-8 characters (not bytes), so it
  makes sense to specify the utf-8 encoding explicitly.
2025-11-26 11:31:16 +01:00
MarcoFalke
fa21631595 test: Use self.log
This is in line with all other functional tests.
2025-06-19 09:00:26 +02:00
MarcoFalke
fa346f7797 test: Move error string into exception
This is normally expected and also less code.
2025-06-19 09:00:22 +02:00
MarcoFalke
fa1986181f test: Remove useless catch-throw
This is not done anywhere else in the tests for open or subprocess.run
2025-06-19 09:00:05 +02:00
MarcoFalke
fa2f1c55b7 move-only util data to test/functional/data/util 2025-06-13 13:07:12 +02:00
MarcoFalke
faa18bf287 test: Turn util/test_runner into functional test
The moved portion can be reviewed via:

--color-moved=dimmed-zebra  --color-moved-ws=ignore-all-space
2025-06-13 13:06:59 +02:00