OILS / mycpp / mops_test.py View on Github | oilshell.org

32 lines, 15 significant
1#!/usr/bin/env python2
2"""
3mops_test.py
4"""
5from __future__ import print_function
6
7import unittest
8
9from mycpp import mops # module under test
10
11
12class MopsTest(unittest.TestCase):
13
14 def testBadOps(self):
15 i = mops.BigInt(1)
16 j = mops.BigInt(2)
17
18 #print(i + j)
19 #print(i <= j)
20
21 #print(-i)
22
23 try:
24 print(i < j)
25 except AssertionError:
26 pass
27 else:
28 self.fail('Expected error')
29
30
31if __name__ == '__main__':
32 unittest.main()