tests.hamcrest_unit_test.TestingBaseMatcher   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 4
Duplicated Lines 0 %
Metric Value
dl 0
loc 4
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A describe_to() 0 2 1
1
if __name__ == "__main__":
2
    import sys
3
    sys.path.insert(0, '..')
4
5
from hamcrest.core.base_matcher import *
6
7
import unittest
8
9
__author__ = "Jon Reid"
10
__copyright__ = "Copyright 2011 hamcrest.org"
11
__license__ = "BSD, see License.txt"
12
13
14
class TestingBaseMatcher(BaseMatcher):
15
16
    def describe_to(self, description):
17
        description.append_text('SOME DESCRIPTION')
18
19
20
class BaseMatcherTest(unittest.TestCase):
21
22
    def testStrFunctionShouldDescribeMatcher(self):
23
        matcher = TestingBaseMatcher()
24
        self.assertEqual('SOME DESCRIPTION', str(matcher))
25
26
27
if __name__ == "__main__":
28
    unittest.main()
29