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.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Update Bazaar unit tests to better compare diffs.
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.
1fddb750cc533f926dfd3ce778c146ebf9fa2bb4 Christian Hammond
rbtools/clients/tests/test_bzr.py
Loading...