1# Copyright (c) 2008-2012 testtools developers. See LICENSE for details. 2 3"""All the matchers. 4 5Matchers, a way to express complex assertions outside the testcase. 6 7Inspired by 'hamcrest'. 8 9Matcher provides the abstract API that all matchers need to implement. 10 11Bundled matchers are listed in __all__: a list can be obtained by running 12$ python -c 'import testtools.matchers; print testtools.matchers.__all__' 13""" 14 15__all__ = [ 16 'AfterPreprocessing', 17 'AllMatch', 18 'Always', 19 'Annotate', 20 'AnyMatch', 21 'Contains', 22 'ContainsAll', 23 'ContainedByDict', 24 'ContainsDict', 25 'DirContains', 26 'DirExists', 27 'DocTestMatches', 28 'EndsWith', 29 'Equals', 30 'FileContains', 31 'FileExists', 32 'GreaterThan', 33 'HasLength', 34 'HasPermissions', 35 'Is', 36 'IsDeprecated', 37 'IsInstance', 38 'KeysEqual', 39 'LessThan', 40 'MatchesAll', 41 'MatchesAny', 42 'MatchesDict', 43 'MatchesException', 44 'MatchesListwise', 45 'MatchesPredicate', 46 'MatchesPredicateWithParams', 47 'MatchesRegex', 48 'MatchesSetwise', 49 'MatchesStructure', 50 'Never', 51 'NotEquals', 52 'Not', 53 'PathExists', 54 'Raises', 55 'raises', 56 'SameMembers', 57 'SamePath', 58 'StartsWith', 59 'TarballContains', 60 'Warnings', 61 'WarningMessage' 62 ] 63 64from ._basic import ( 65 Contains, 66 EndsWith, 67 Equals, 68 GreaterThan, 69 HasLength, 70 Is, 71 IsInstance, 72 LessThan, 73 MatchesRegex, 74 NotEquals, 75 SameMembers, 76 StartsWith, 77 ) 78from ._const import ( 79 Always, 80 Never, 81 ) 82from ._datastructures import ( 83 ContainsAll, 84 MatchesListwise, 85 MatchesSetwise, 86 MatchesStructure, 87 ) 88from ._dict import ( 89 ContainedByDict, 90 ContainsDict, 91 KeysEqual, 92 MatchesDict, 93 ) 94from ._doctest import ( 95 DocTestMatches, 96 ) 97from ._exception import ( 98 MatchesException, 99 Raises, 100 raises, 101 ) 102from ._filesystem import ( 103 DirContains, 104 DirExists, 105 FileContains, 106 FileExists, 107 HasPermissions, 108 PathExists, 109 SamePath, 110 TarballContains, 111 ) 112from ._higherorder import ( 113 AfterPreprocessing, 114 AllMatch, 115 Annotate, 116 AnyMatch, 117 MatchesAll, 118 MatchesAny, 119 MatchesPredicate, 120 MatchesPredicateWithParams, 121 Not, 122 ) 123from ._warnings import ( 124 IsDeprecated, 125 WarningMessage, 126 Warnings, 127 ) 128 129# XXX: These are not explicitly included in __all__. It's unclear how much of 130# the public interface they really are. 131from ._impl import ( 132 Matcher, 133 Mismatch, 134 MismatchError, 135 ) 136