Skip to content

Conversation

@jamillambert
Copy link
Collaborator

@jamillambert jamillambert commented Sep 4, 2025

#348 describes the problem.

  • There is a variation in the way into_model() is used, e.g. unwrap() vs expect(), using let _ = or not, explicit error typing. Make all occurrences in integration_test the same. Explicitly state the error type, this required some new imports in the test files and exports in types.
    • NumericError exported in types v17 and reexported up to v29.
    • WalletProcessPsbtError exported in v26 and reexported up to v29.
  • There is a variation in placing the version feature gate above or below the test attribute. Change them all to be consistent.

There is a variation in the way `into_model()` is used, e.g. `unwrap()`
vs `expect()`, `using let _ =` or not, explicit error typing.

Make all occurrences in integration_test the same.
There is a variation in placing the version feature gate above or below
the test attribute.

Change them all to be consistent.
@jamillambert jamillambert force-pushed the 0904-test-syntax branch 2 times, most recently from 9bddc31 to 4fcbef1 Compare September 4, 2025 15:55
@jamillambert jamillambert changed the title Unify the style in integration tests Unify the into_model style in integration tests Sep 4, 2025
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 4fcbef1

@tcharding tcharding merged commit 0e3f028 into rust-bitcoin:master Sep 5, 2025
30 checks passed
@tcharding
Copy link
Member

Nice! Re-export fixes prove this was worth doing.

@tcharding
Copy link
Member

Patch 2 is right out of my play book, I f***ing love it.

blaze-smith470pm added a commit to blaze-smith470pm/corepc that referenced this pull request Sep 26, 2025
…ation tests

4fcbef1da2d7da13bd7d019f218f5240bb99b9ee Unify test version feature gate placement (Jamil Lambert, PhD)
eeb4f3088ff7ae5adea4debc8e843b290348e2d8 Unify integration_test into_model() calls (Jamil Lambert, PhD)

Pull request description:

  #348 describes the problem.

  - There is a variation in the way `into_model()` is used, e.g. `unwrap()` vs `expect()`, `using let _ =` or not, explicit error typing. Make all occurrences in `integration_test` the same. Explicitly state the error type, this required some new imports in the test files and exports in types.
    - `NumericError` exported in types v17 and reexported up to v29.
    - `WalletProcessPsbtError` exported in v26 and reexported up to v29.
  - There is a variation in placing the version feature gate above or below the test attribute. Change them all to be consistent.

ACKs for top commit:
  tcharding:
    ACK 4fcbef1da2d7da13bd7d019f218f5240bb99b9ee

Tree-SHA512: 6d91614c7f01fecfcba87a8c9481fbbdc62c64edeedfd394115845e9360d15bdae117f9335d952178a7fbc21d0a49e51aaf8920a16d1f711322a702df755ef09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants