Commit cd43a0f6 authored by Kevin Modzelewski's avatar Kevin Modzelewski

I think this test was in the wrong file

parent 2294c2a7
......@@ -39,3 +39,13 @@ add(A(), B())
add(A(), C())
add(B(), B())
add(B(), C())
class Int(int):
def __add__(self, rhs):
print "Int.__add__", rhs
return int.__add__(self, rhs)
def __radd__(self, rhs):
print "Int.__radd__", rhs
return int.__radd__(self, rhs)
print sum([Int(2)])
# expected: fail
# - with statements
# Test for various defaults arguments in builtin functions:
class ExpectationFailedException(Exception):
......@@ -36,15 +33,6 @@ with expected_exception(KeyError):
print min([1])
print min([1], None)
class Int(int):
def __add__(self, rhs):
print "Int.__add__", rhs
return int.__add__(self, rhs)
def __radd__(self, rhs):
print "Int.__radd__", rhs
return int.__radd__(self, rhs)
print sum([Int(2)])
with expected_exception(AttributeError):
print getattr(object(), "")
print getattr(object(), "", None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment