-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Bug]: Testing.get_tap_test_class fails with "fixture 'stream' not found" #1370
Comments
@qbatten are you using Python 3.6? I don't believe we're officially supporting that version. @edgarrmondragon I see you thumbsupped this - is this related to the python version or is there another potential solution? |
@tayloramurphy Ah! Sorry! I set the version wrong in the issue. I am on 3.10. Just fixed it in the description. Also pushed up a commit that has the full repro https://github.com/qbatten/tap-postgres/tree/sdk-issue-1370 (It's as-described in the ticket but figured this way is more convenient for anyone investigating) |
@qbatten I think you need to add the following to a """Test Configuration."""
pytest_plugins = ("singer_sdk.testing.pytest_plugin",) see #1171 (review) and https://github.com/MeltanoLabs/tap-stackexchange/blob/a188ae690f7c1f1059c778928dd3c7ec7ae07285/tests/conftest.py |
Aha! Yes, that solved this. I also had to update pytest and, along with that, move the tests folder out into the rootdir of the repo, from |
Singer SDK Version
0.19.0
Python Version
3.10
Bug scope
Taps (catalog, state, stream maps, etc.)
Operating System
Mac OS
Description
I'm trying to use the new testing fixtures in 0.19.0. Using a minimal example that matches this section of the SDK testing docs. When I try to run it, I get several errors about missing a stream fixture.
To reproduce, you can clone MeltanoLabs/tap-postgres and add a new test file that contains the following.
Code to reproduce
Here's a full printout of the errors I'm getting.
Error
Excluding stream and stream_attribute tests results in no errors. (Adding these kwargs to get_tap_test_class in the reproducible example above.)
I think this is related to StreamTestTemplate, either instantiation or its
run
method being called.Code
No response
The text was updated successfully, but these errors were encountered: