Completed
Pull Request — master (#70)
by
unknown
01:14
created

NeverMatch   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A matches() 0 4 2
A describe_mismatch() 0 2 1
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