Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pytest plugin to suppress web3 activation order in pytest #19

Open
darwintree opened this issue Jun 5, 2023 · 1 comment
Open

Comments

@darwintree
Copy link
Collaborator

deploy_hash = construct_c.constructor(
os.environ["NAME"],
os.environ["SYMBOL"],
# c_w3.cfx.contract(name="CrossSpaceCall").address
'CFXTEST:TYPE.BUILTIN:AAEJUAAAAAAAAAAAAAAAAAAAAAAAAAAAA2EAEG85P5',
).transact()


value = 'CFXTEST:TYPE.BUILTIN:AAEJUAAAAAAAAAAAAAAAAAAAAAAAAAAAA2EAEG85P5'

def validate_address(value: Any) -> None:
    """
    Helper function for validating an address
    """
    if is_not_address_string(value):
        if not is_valid_ens_name(value):
          raise InvalidAddress(f"ENS name: '{value}' is invalid.")

E web3.exceptions.InvalidAddress: ENS name: 'CFXTEST:TYPE.BUILTIN:AAEJUAAAAAAAAAAAAAAAAAAAAAAAAAAAA2EAEG85P5' is invalid.

@darwintree darwintree added the bug Something isn't working label Jun 5, 2023
@darwintree darwintree changed the title BUG: address as contract constructor parameter Add pytest plugin to suppress web3 activation order in pytest Jun 9, 2023
@darwintree darwintree removed the bug Something isn't working label Jun 9, 2023
@darwintree
Copy link
Collaborator Author

Add pytest.ini in test root directory

[pytest]
addopts = -p no:pytest_ethereum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant