Skip to content

Commit

Permalink
test: test isolation functions correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
skellet0r committed Apr 17, 2022
1 parent 98da061 commit e6f56e7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/integration/cli/projects/test/tests/test_test.py
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

0 comments on commit e6f56e7

Please sign in to comment.