diff --git a/test_extclass.py b/test_extclass.py index a458dbb0..3b107058 100644 --- a/test_extclass.py +++ b/test_extclass.py @@ -264,6 +264,18 @@ Sequence tests: >>> map(lambda x:x, Range(3, 10)[0:4]) [3, 4, 5, 6] +Numeric tests: + >>> x = Rational(2,3) + >>> y = Rational(1,4) + >>> print x + y + 11/12 + >>> print x - y + 5/12 + >>> print x * y + 1/6 + >>> print x / y + 8/3 + delete non-existent attribute: del m.foobar Traceback (innermost last): @@ -412,6 +424,7 @@ Testing __call__: 0 >>> comparator(couple2, couple) 1 + ''' from demo import *