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

bug: get_tap_test_class does not work with th.OneOf #2889

Open
ajeetdsouza opened this issue Feb 28, 2025 · 1 comment
Open

bug: get_tap_test_class does not work with th.OneOf #2889

ajeetdsouza opened this issue Feb 28, 2025 · 1 comment
Assignees
Labels
kind/Bug Something isn't working Type/Tap Singer taps

Comments

@ajeetdsouza
Copy link

If I define a Stream like so:

class FileStream(Stream):
    name: str = "files"
    primary_keys: list[str] = ["path"]
    schema: dict = th.PropertiesList(
        th.Property("content", th.OneOf(th.StringType, th.ObjectType()))
    ).to_dict()

And attempt to define a test class:

TestTapFiles = get_tap_test_class(TapFiles, config=SAMPLE_CONFIG)

pytest will fail during test discovery itself, with the following error:

FAILED tap_test.py - ValueError: Could not detect type of replication key using schema '{}'
@edgarrmondragon
Copy link
Collaborator

Thank you for reporting @ajeetdsouza. I'll take a look next week.

@edgarrmondragon edgarrmondragon self-assigned this Mar 1, 2025
@edgarrmondragon edgarrmondragon added kind/Bug Something isn't working Type/Tap Singer taps labels Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/Bug Something isn't working Type/Tap Singer taps
Projects
None yet
Development

No branches or pull requests

2 participants