Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use assert_greater_than util #30019

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on May 3, 2024

  1. test: use assert_greater_than util and add to where imports are needed

    In the functional tests there are lots of cases where we assert < which
    this util will replace, we also are adding the imports and the
    following commit will add the assertion
    kevkevinpal committed May 3, 2024
    Configuration menu
    Copy the full SHA
    e231cc7 View commit details
    Browse the repository at this point in the history
  2. scripted-diff: swapped where < was used and used assert_greater_than

    -BEGIN VERIFY SCRIPT-
    git grep -l -E "assert .*<{1} [\=\<]{0}" -- ':(exclude)*script.py' ':(exclude)*rpc_createmultisig.py' ':(exclude)*feature_taproot.py' ':(exclude)*wallet_create_tx.py' ':(exclude)*p2p.py' ./test/functional | xargs sed -i.bak -e "/assert .*< / s/assert \(.*\) <\([^#]*\)/assert\2 < \1/"
    git grep -l -E "assert .*<{1} [\=\<]{0}" -- ':(exclude)*script.py' ':(exclude)*rpc_createmultisig.py' ':(exclude)*feature_taproot.py' ':(exclude)*wallet_create_tx.py' ':(exclude)*p2p.py' ./test/functional | xargs sed -i.bak -e "/assert .*< / s/assert \(.*\) <\([^#]*\)/assert_greater_than(\1,\2)/g" -e "s/assert_greater_than(\(.*\)\(#.*\)/assert_greater_than(\1 \2/g" -e "/assert_greater_than(/ s/\ \ ,/,/g"
    -END VERIFY SCRIPT-
    kevkevinpal committed May 3, 2024
    Configuration menu
    Copy the full SHA
    04d8f07 View commit details
    Browse the repository at this point in the history
  3. test: using assert_greater_than for edge cases

    For the cases which the scripted diff did not make sense these were
    manually updated, like if we had multiple operators on one line or if it
    was wrapped in () already
    kevkevinpal committed May 3, 2024
    Configuration menu
    Copy the full SHA
    fe07516 View commit details
    Browse the repository at this point in the history