-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from charles-cooper/fix/address-inheritance
refactor: Address inherit from bytes
- Loading branch information
Showing
9 changed files
with
43 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
from hypothesis import HealthCheck, given, settings | ||
from hypothesis.strategies._internal.deferred import DeferredStrategy | ||
from hypothesis.strategies import SearchStrategy | ||
|
||
from boa.test import strategy | ||
from boa.util.abi import Address | ||
|
||
|
||
def test_strategy(): | ||
assert isinstance(strategy("address"), DeferredStrategy) | ||
assert isinstance(strategy("address"), SearchStrategy) | ||
|
||
|
||
@given(value=strategy("address")) | ||
@settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) | ||
def test_given(value): | ||
assert isinstance(value, str) | ||
|
||
|
||
def test_repr(): | ||
assert repr(strategy("address")) == "sampled_from(accounts)" | ||
assert isinstance(value, Address) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters