• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-cli / 11553401933

28 Oct 2024 11:57AM UTC coverage: 88.612% (-0.03%) from 88.64%
11553401933

push

github

web-flow
Bump safe-eth-py from 6.0.0b35 to 6.0.0b40 (#452)

* Bump safe-eth-py from 6.0.0b35 to 6.0.0b40

Bumps [safe-eth-py](https://github.com/safe-global/safe-eth-py) from 6.0.0b35 to 6.0.0b40.
- [Release notes](https://github.com/safe-global/safe-eth-py/releases)
- [Commits](https://github.com/safe-global/safe-eth-py/compare/v6.0.0b35...v6.0.0b40)

---
updated-dependencies:
- dependency-name: safe-eth-py
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Rename package gnosis -> safe_eth

* Update dependencies

* Remove python 3.9 from CI

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Uxio Fuentefria <6909403+Uxio0@users.noreply.github.com>

221 of 262 branches covered (84.35%)

Branch coverage included in aggregate %.

66 of 66 new or added lines in 20 files covered. (100.0%)

1 existing line in 1 file now uncovered.

2868 of 3224 relevant lines covered (88.96%)

2.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.43
/tests/test_typer_validators.py
1
import unittest
3✔
2

3
import typer
3✔
4
from eth_account import Account
3✔
5
from eth_typing import ChecksumAddress
3✔
6
from hexbytes import HexBytes
3✔
7

8
from safe_cli.typer_validators import (
3✔
9
    ChecksumAddressParser,
10
    HexBytesParser,
11
    check_ethereum_address,
12
    check_hex_str,
13
    check_private_keys,
14
)
15

16

17
class TestTyperValidators(unittest.TestCase):
3✔
18

19
    def test_check_ethereum_address(self):
3✔
20
        address = "0x4127839cdf4F73d9fC9a2C2861d8d1799e9DF40C"
3✔
21
        self.assertEqual(check_ethereum_address(address), ChecksumAddress(address))
3✔
22

23
        not_valid_address = "0x4127839CDf4F73d9fC9a2C2861d8d1799e9DF40C"
3✔
24
        with self.assertRaises(typer.BadParameter):
3✔
25
            check_ethereum_address(not_valid_address)
3✔
26

27
    def test_check_private_keys(self):
3✔
28
        account = Account.create()
3✔
29
        self.assertEqual(check_private_keys([account.key.hex()]), [account.key.hex()])
3✔
30

31
        with self.assertRaises(typer.BadParameter):
3✔
32
            check_private_keys(["Random"])
3✔
UNCOV
33
            check_private_keys([])
×
34

35
    def test_check_hex_str(self):
3✔
36
        self.assertEqual(check_hex_str("0x12"), HexBytes("0x12"))
3✔
37

38
        with self.assertRaises(typer.BadParameter):
3✔
39
            check_hex_str("0x12x")
3✔
40

41
    def test_parse_checksum_address(self):
3✔
42
        address = "0x4127839cdf4F73d9fC9a2C2861d8d1799e9DF40C"
3✔
43
        self.assertEqual(
3✔
44
            ChecksumAddressParser().convert(address, None, None),
45
            ChecksumAddress(address),
46
        )
47

48
    def test_parse_hex_str(self):
3✔
49
        self.assertEqual(HexBytesParser().convert("0x12", None, None), HexBytes("0x12"))
3✔
50

51

52
if __name__ == "__main__":
53
    unittest.main()
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc