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

Feature request - package pytest fixtures for downstream libs #753

Closed
dazza-codes opened this issue Feb 9, 2020 · 3 comments
Closed

Feature request - package pytest fixtures for downstream libs #753

dazza-codes opened this issue Feb 9, 2020 · 3 comments
Labels
enhancement New feature or request Stale

Comments

@dazza-codes
Copy link
Contributor

dazza-codes commented Feb 9, 2020

Would it be possible to add a development option to the package so that it can provide pytest fixtures to downstream projects? Something like aiobotocore[dev] might provide pytest fixture methods? (It might introduce additional namespace requirements on the test suite.)

For example, dask provides test utilities in the package, see

Maybe this is out-of-scope in this project or it means a spin-off for something like a new "aiomoto" project.

PS, this is not a bug report - the issue creation options did not include a "feature request"

Related issues: #583 and #665

@thehesiod
Copy link
Collaborator

what in particular pytest packages would you like aioboto to provide? Seems like this is more of a aiomoto kind of thing.

@thehesiod thehesiod added the enhancement New feature or request label Feb 15, 2020
@dazza-codes
Copy link
Contributor Author

dazza-codes commented Feb 16, 2020

In the short term, it might help if this project could expose a package-extra that might somehow bundle the pytest fixtures that manage the moto server (the tests/conftest.py module and the associated moto_server.py). Using moto defaults, it hooks into the before-call event and short-circuits all the aiobotocore request/response processing, but the test suite in this project disables that default moto behavior (details are noted in #755). Another option is to figure out a PR on moto that might provide some kind of aio option for the moto.settings.

# setup.py
setup(
    # the following makes a plugin available to pytest
    entry_points = {
        'pytest11': [
            'aiomoto = tests.conftest.py',  # or something
        ]
    },
    classifiers=["Framework :: Pytest"],
)

Providing the pytest-fixtures as a package extra would allow the fixtures to remain in this project so they continue to evolve along with this project, to be sure they work as required. If they are split out into a new aiomoto project, it could take on an independent life unless this project starts to depend on it as a pytest plugin. In the long term, an aiomoto project might replace flask with sanic for the server (but that might not really help things a whole lot).

@dazza-codes dazza-codes mentioned this issue Feb 19, 2020
@helpr helpr bot added the pr-available label Feb 19, 2020
Copy link

This issue has been marked as stale because it has been inactive for more than 60 days. Please update this pull request or it will be automatically closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 20, 2024
@github-actions github-actions bot removed the Stale label Aug 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants