Fix method signature mismatch in subclass
This commit is contained in:
parent
0be3652c29
commit
4be870c50b
|
@ -63,7 +63,7 @@ class Address(object):
|
|||
class SubAddress(Address):
|
||||
_valid_netbytes = (42, 63)
|
||||
|
||||
def with_payment_id(self):
|
||||
def with_payment_id(self, _):
|
||||
raise TypeError("SubAddress cannot be integrated with payment ID")
|
||||
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ class Tests(object):
|
|||
a = Address(self.addr)
|
||||
self.assertRaises(TypeError, a.with_payment_id, 2**64+1)
|
||||
self.assertRaises(TypeError, a.with_payment_id, "%x" % (2**64+1))
|
||||
s = SubAddress(self.subaddr)
|
||||
self.assertRaises(TypeError, s.with_payment_id, 0)
|
||||
|
||||
def test_type_mismatch(self):
|
||||
self.assertRaises(ValueError, Address, self.iaddr)
|
||||
|
|
Loading…
Reference in New Issue