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

Sort meta keys before printing to fix tests broken by Beancount 2.3.6 #213

Merged

Conversation

ankurdave
Copy link
Contributor

beancount/beancount#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.

Fixes #212.

@Zburatorul Zburatorul merged commit 055253c into jbms:master Nov 13, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are broken after release of Beancount 2.3.6
2 participants