<s> import unittest <EOL> from pycoin . key import Key <EOL> from pycoin . key . electrum import ElectrumWallet <EOL> MPK = <NUM_LIT:1> <EOL> RECEIVING_ADDRESSES = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> CHANGE_ADDRESSES = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> class ElectrumTest ( unittest . TestCase ) : <EOL> def test_1 ( self ) : <EOL> wallet = ElectrumWallet ( initial_key = "<STR_LIT>" ) <EOL> for idx , address in enumerate ( RECEIVING_ADDRESSES ) : <EOL> subkey = wallet . subkey ( "<STR_LIT>" % idx ) <EOL> calculated_address = subkey . address ( ) <EOL> self . assertEqual ( address , calculated_address ) <EOL> wif = subkey . wif ( ) <EOL> key = Key . from_text ( wif ) <EOL> self . assertEqual ( key . address ( use_uncompressed = True ) , address ) <EOL> for idx , address in enumerate ( CHANGE_ADDRESSES ) : <EOL> subkey = wallet . subkey ( "<STR_LIT>" % idx ) <EOL> calculated_address = subkey . address ( ) <EOL> self . assertEqual ( address , calculated_address ) <EOL> wif = subkey . wif ( ) <EOL> key = Key . from_text ( wif ) <EOL> self . assertEqual ( key . address ( use_uncompressed = True ) , address ) </s>
