-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
@confluentinc/quality-eng is tagged for visibility
Describe the bug
@matrix
annotation is working only if list of primitives are used and not if list of objects are used.
To Reproduce
You can use following example to reproduce :
@dataclass
class Car:
x: int
y: int
@dataclass
class Bus:
x: int
y: int
# Declare global var of list of objects :
CARS = [Car(1,2)]
BUSES = [Bus(1,2), Bus(2,3)]
# Following annotation works :
@matrix(car_index=[0], bus_index=[0,1])
def test(self, car_index: int, bus_index: int):
car = CARS[car_index]
bus = BUSES[bus_index]
# However, this one is not working :
@matrix(car=CARS, bus=BUSES)
def test(self, car: Car, bus: Bus):
pass
Expected behavior
The tests should work even when list of objects are passed into @matrix
.
Metadata
Metadata
Assignees
Labels
No labels