describe_mismatch()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 2
rs 10
1
from hamcrest.core.base_matcher import BaseMatcher
2
3
__author__ = "Jon Reid"
4
__copyright__ = "Copyright 2011 hamcrest.org"
5
__license__ = "BSD, see License.txt"
6
7
8
class NeverMatch(BaseMatcher):
9
10
    mismatch_description = 'NEVERMATCH'
11
12
    def matches(self, item, mismatch_description=None):
13
        if mismatch_description:
14
            self.describe_mismatch(item, mismatch_description)
15
        return False
16
17
    def describe_mismatch(self, item, mismatch_description):
18
        mismatch_description.append_text(NeverMatch.mismatch_description)
19