mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
Fix method signature mismatch in subclass
This commit is contained in:
parent
0be3652c29
commit
4be870c50b
2 changed files with 3 additions and 1 deletions
|
@ -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 a new issue