Page MenuHomePhabricator

test: replace remaining binascii method calls in functional tests
ClosedPublic

Authored by PiRK on Mar 7 2022, 09:40.

Details

Summary

Instances of binascii's methods hexlify, unhexlify, and a2b_hex have been replaced with the build-in bytes module's hex and fromhex methods where appropriate to make bytes <-> hex-string conversions consistent across the functional test files and test_framework.

Also update some code in a comment in serialize_tests.cpp that was using binascii. This code also needed additional changes to work with python3 (because in python 3 you cannot join bytes using a str separator).

This is a backport of core#22619

Test Plan

ninja check-functional-extended

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Mar 7 2022, 09:40
PiRK edited the summary of this revision. (Show Details)

additional fixes to the code in the comments of serialize_tests.cpp. This was python 2 code that could not work with python 3 because str is no longer the same thing as bytes.

This revision is now accepted and ready to land.Mar 7 2022, 09:54