Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix import from pytest-ethereum error
- Loading branch information
1 parent
c6cbb8f
commit faaabd6
Showing
11 changed files
with
48 additions
and
19 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
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 +1 @@ | ||
from .pytest_ethereum import linker # noqa: F401 | ||
from .pytest_ethereum import deployer, linker # noqa: F401 |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import json | ||
from pathlib import Path | ||
from typing import Callable | ||
|
||
from ethpm import Package | ||
import pytest | ||
from web3 import Web3 | ||
|
||
from web3.tools.pytest_ethereum.deployer import Deployer | ||
|
||
|
||
# @pytest.fixture | ||
# def w3() -> Web3: | ||
# w3 = Web3(Web3.EthereumTesterProvider()) | ||
# return w3 | ||
|
||
|
||
@pytest.fixture | ||
def deployer(w3: Web3) -> Callable[[Path], Deployer]: | ||
""" | ||
Returns a `Deployer` instance composed from a `Package` instance | ||
generated from the manifest located at the provided `path` folder. | ||
""" | ||
|
||
def _deployer(path: Path) -> Deployer: | ||
manifest = json.loads(path.read_text()) | ||
package = Package(manifest, w3) | ||
return Deployer(package) | ||
|
||
return _deployer |