def test_child(self):
    seed = b'example@example.com Jimmy Song'
    priv = HDPrivateKey.from_seed(seed, testnet=True)
    pub = priv.pub
    want = 'EXAMPLE_KEY'
    addr = priv.child(0).bech32_address()
    self.assertEqual(addr, want)
    addr = pub.child(0).bech32_address()
    self.assertEqual(addr, want)
    addr = priv.child(2147483650).bech32_address()
    self.assertEqual(addr, 'EXAMPLE_KEY')
    with self.assertRaises(ValueError):
        pub.child(2147483650)
def test_child(self):
    seed = b'example@example.com Jimmy Song'
    priv = HDPrivateKey.from_seed(seed, testnet=True)
    pub = priv.pub
    want = 'EXAMPLE_KEY'
    addr = priv.child(0).bech32_address()
    self.assertEqual(addr, want)
    addr = pub.child(0).bech32_address()
    self.assertEqual(addr, want)
    addr = priv.child(2147483650).bech32_address()
    self.assertEqual(addr, 'EXAMPLE_KEY')
    with self.assertRaises(ValueError):
        pub.child(2147483650)