File: base_matcher_test.py

package info (click to toggle)
pyhamcrest 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 556 kB
  • sloc: python: 2,938; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if __name__ == "__main__":
    import sys
    sys.path.insert(0, '..')

from hamcrest.core.base_matcher import *

import unittest

__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"


class TestingBaseMatcher(BaseMatcher):

    def describe_to(self, description):
        description.append_text('SOME DESCRIPTION')


class BaseMatcherTest(unittest.TestCase):

    def testStrFunctionShouldDescribeMatcher(self):
        matcher = TestingBaseMatcher()
        self.assertEqual('SOME DESCRIPTION', str(matcher))


if __name__ == "__main__":
    unittest.main()