File: unittestmock.py

package info (click to toggle)
python-cykhash 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,240 kB
  • sloc: python: 3,954; sh: 90; makefile: 7
file content (18 lines) | stat: -rw-r--r-- 441 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class UnitTestMock:
    def assertEqual(self, a, b, **kwds):
        if "msg" in kwds:
            assert a == b, kwds["msg"]
        else:
            assert a == b

    def assertFalse(self, a, **kwds):
        if "msg" in kwds:
            assert not a, kwds["msg"]
        else:
            assert not a

    def assertTrue(self, a, **kwds):
        if "msg" in kwds:
            assert a, kwds["msg"]
        else:
            assert a