Skip to content

Commit

Permalink
Added one test with nocompile
Browse files Browse the repository at this point in the history
  • Loading branch information
scyron6 committed Apr 14, 2022
1 parent b7c3fb4 commit 3313a63
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/cli/test_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ def test_multiple_commands(testproject, accounts, history, console):
assert len(history) == 2
assert testproject.BrownieTester[0].owner() == accounts[0]

def test_multiple_commands_with_nocompile(testproject_nocompile, accounts, history, console):
shell = console(testproject_nocompile)
_run_cmd(
shell,
[
"config",
"accounts[0].deploy(BrownieTester, True)",
"BrownieTester[0].doNothing()",
'accounts.add("0x416b8a7d9290502f5661da81f0cf43893e3d19cb9aea3c426cfb36e8186e9c09")',
],
)
assert len(history) == 2
assert testproject_nocompile.BrownieTester[0].owner() == accounts[0]


def test_multiline_commands(accounts, history, console):
shell = console()
Expand Down
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ def testproject(_project_factory, project, tmp_path):
os.chdir(path)
return project.load(path, "TestProject")

# same as function above but doesn't compile
@pytest.fixture
def testproject_nocompile(_project_factory, project, tmp_path):
path = tmp_path.joinpath("testproject")
_copy_all(_project_factory, path)
os.chdir(path)
return project.load(path, "TestProject", compile=False)


@pytest.fixture
def tp_path(testproject):
Expand Down

0 comments on commit 3313a63

Please sign in to comment.