Update Bazaar unit tests to better compare diffs.

Review Request #12545 — Created Aug. 18, 2022 and submitted — Latest diff uploaded

Information

RBTools
release-4.x

Reviewers

SCMClient unit tests recently got a refresh, fixing up a lot of
comparisons to better catch changes in diff content or dictionary
results.

The Bazaar unit tests were included in this, but still had old md5-based
comparison of diff contents, with some hacky ways of building up a
response and validating it. This wasn't very maintainable, though it was
easier to leave it be while fixing everything else up.

This change replaces those with mostly-direct result comparisons. The
diffs are passed through a normalization process, using the exact same
logic introduced for the Perforce diff comparisons. This ensures that
dates are always a fixed value.

Unit tests pass on Python 3.7-3.11.

Commits

Files

    Loading...