Skip to content

Commit

Permalink
test: Add test for behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Aug 18, 2020
1 parent 3b4643a commit ff48ad8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test/plugin/test_conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/python3


def test_load_contract_type(plugintester):
plugintester.makeconftest(
"""
import pytest
from brownie import BrownieTester
@pytest.fixture(params=[BrownieTester, BrownieTester])
def brownie_tester(request):
yield request.param"""
)

plugintester.makepyfile(
"""
def test_call_and_transact(brownie_tester, accounts, web3, fn_isolation):
c = accounts[0].deploy(brownie_tester, True)
c.setNum(12, {'from': accounts[0]})
assert web3.eth.blockNumber == 2
c.getTuple(accounts[0])
assert web3.eth.blockNumber == 2"""
)

result = plugintester.runpytest("-n 2")
result.assert_outcomes(passed=2)

0 comments on commit ff48ad8

Please sign in to comment.