Primarily test support, Matchers are used by self.assertThat in the bzrlib test suite. A matcher is a stateful test helper which can be used to determine if a passed object 'matches', much like a regex. If the object does not match the mismatch can be described in a human readable fashion. assertThat then raises if a mismatch occurs, showing the description as the assertion error.
Matchers are designed to be more reusable and composable than layered assertions in Test Case objects, so they are recommended for new testing work.
Class | ReturnsUnlockable | A matcher that checks for the pattern we want lock* methods to have: |
Class | MatchesAncestry | A matcher that checks the ancestry of a particular revision. |
Class | HasLayout | A matcher that checks if a tree has a specific layout. |
Class | _IsLocked | Something is locked. |
Class | _AncestryMismatch | Ancestry matching mismatch. |