-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test isolation functions correctly
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def alice(accounts): | ||
yield accounts[0] | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def bob(accounts): | ||
yield accounts[1] | ||
|
||
|
||
@pytest.fixture(scope="module", autouse=True) | ||
def setup(alice, bob): | ||
alice.transfer(bob, 10**18) | ||
|
||
|
||
def test_test(): | ||
assert True | ||
|
||
|
||
def test_isolation_first(alice, bob, chain): | ||
assert chain.provider.get_block("latest").number == 1 | ||
assert bob.balance == 1_000_001 * 10**18 | ||
alice.transfer(bob, "1 ether") | ||
|
||
|
||
def test_isolation_second(bob, chain): | ||
assert chain.provider.get_block("latest").number == 1 | ||
assert bob.balance == 1_000_001 * 10**18 |