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

Create test fixture for different types of tokens [APE-692] #27

Open
fubuloubu opened this issue Mar 5, 2023 · 2 comments
Open

Create test fixture for different types of tokens [APE-692] #27

fubuloubu opened this issue Mar 5, 2023 · 2 comments

Comments

@fubuloubu
Copy link
Member

Overview

https://github.com/bEsPoKeN-tOkEns/token-tester

Specification

Describe the syntax and semantics of how you would like to see this feature implemented. The more detailed the better!

Remember, your feature is much more likely to be included if it does not involve any breaking changes.

Dependencies

Include links to any open issues that must be resolved before this feature can be implemented.

@NotPeopling2day NotPeopling2day changed the title Create test fixture for different types of tokens Create test fixture for different types of tokens [APE-692] Mar 5, 2023
@antazoey
Copy link
Member

I was just about to create a similar issue.
We may not necessarily need to offer a fixture but just a way to easily use in a fixture but that we scripts in more complex integration setups can also make use of such testing capabilities, like test environments wink wink.

@fubuloubu
Copy link
Member Author

fubuloubu commented Oct 12, 2023

I was just about to create a similar issue. We may not necessarily need to offer a fixture but just a way to easily use in a fixture but that we scripts in more complex integration setups can also make use of such testing capabilities, like test environments wink wink.

sure, I think letting scripts be exported as something to use in test fixtures would be great, so you can install all of the token variations in this plugin to use on your local testnet via tokens manager object, which you can leverage via parametrized fixture e.g.:

import pytest
from ape_tokens import tokens


@pytest.fixture(params=["USDC", "DAI", ...])
def token(request):
    return tokens[request.param]

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

2 participants