Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
651 B
2
Indexable
Never
@pytest.mark.parametrize(
    "sample_data, test_data, expected_data",
    [
        # Test case: Normal scenario
        (
            [("apple",), ("banana",), ("cherry",), ("apple",), ("banana",)],
            [("apple",), ("banana",), ("date",), ("elderberry",)],
            [("apple", 0), ("banana", 1)]
        ),
        # Test case: Only one unique value
        (
            [("apple",), ("apple",), ("apple",)],
            [("apple",), ("banana",)],
            [("apple", 0)]
        ),
        # Test case: No value present in trained dict
        (
            [("apple",)],
            [("banana",)],
            []
        ),
    ]
)