https://github.com/beancount/beancount/pull/726 (released in Beancount 2.3.6) changed the sort order of posting meta items when converting postings to strings. The meta items were previously printed in sorted order, and now are printed in insertion order. This breaks most beancount-import tests because they determine correctness by comparing transactions' string representations.
This PR introduces SortedEntryPrinter, which wraps Beancount's EntryPrinter and restores the previous behavior. It uses SortedEntryPrinter in the two places where tests rely on sort order. This fixes the tests.
https://github.com/beancount/beancount/pull/726 (released in Beancount 2.3.6) changed the sort order of posting meta items when converting postings to strings. The meta items were previously printed in sorted order, and now are printed in insertion order. This breaks most beancount-import tests because they determine correctness by comparing transactions' string representations.
This PR introduces
SortedEntryPrinter
, which wraps Beancount'sEntryPrinter
and restores the previous behavior. It usesSortedEntryPrinter
in the two places where tests rely on sort order. This fixes the tests.Fixes #212.