Skip to content

ERT tests should not assume anything about the state #473

Description

@bcc32

Some of the newer tests seem to only work when run in the default, alphabetical order with all of the tests selected. For example, ledger-report/expand-format-specifiers depends on the current buffer being some source buffer whose major mode is ledger-mode. This is not a valid assumption for running ERT tests interactively, or running a subset of the tests.

We should:

  • Run tests in randomized order to catch such accidental ordering dependencies
  • Consistently use ledger-tests-with-temp-file to set up the test state
  • Perhaps add an AGENTS.md file to ensure this doesn't break going forward?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions