Skip to content

Commit

Permalink
perf: test account repr improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Dec 23, 2024
1 parent 0c75af6 commit 9cfc122
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ape_test/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ape.exceptions import ProviderNotConnectedError, SignatureError
from ape.types.signatures import MessageSignature, TransactionSignature
from ape.utils._web3_compat import sign_hash
from ape.utils.misc import log_instead_of_fail
from ape.utils.testing import (
DEFAULT_NUMBER_OF_TEST_ACCOUNTS,
DEFAULT_TEST_HD_PATH,
Expand Down Expand Up @@ -141,6 +142,10 @@ class TestAccount(TestAccountAPI):

__test__ = False

@log_instead_of_fail(default="<TestAccount>")
def __repr__(self) -> str:
return f"<{self.__class__.__name__}_{self.index} {self.address_str}>"

@property
def alias(self) -> str:
return f"TEST::{self.index}"
Expand Down

0 comments on commit 9cfc122

Please sign in to comment.