@@ -74,6 +74,83 @@ def test_standard_collection(collect_tests, file, cmds, selection):
74
74
assert collection == selection
75
75
76
76
77
+ @make_parametrization (
78
+ Config (
79
+ new_cmds = ("-k" , "cpu" ),
80
+ legacy_cmds = ("-k" , "cpu" ),
81
+ selection = (
82
+ "::TestFooCPU::test_bar_cpu" ,
83
+ "::TestFooCPU::test_baz_cpu" ,
84
+ "::TestSpamCPU::test_ham_cpu" ,
85
+ "::TestSpamCPU::test_eggs_cpu" ,
86
+ "::TestQuxCPU::test_quux_cpu" ,
87
+ ),
88
+ ),
89
+ Config (
90
+ new_cmds = ("-k" , "meta" ),
91
+ legacy_cmds = ("-k" , "meta" ),
92
+ selection = (
93
+ "::TestFooMETA::test_bar_meta" ,
94
+ "::TestFooMETA::test_baz_meta" ,
95
+ "::TestSpamMETA::test_ham_meta" ,
96
+ "::TestSpamMETA::test_eggs_meta" ,
97
+ ),
98
+ ),
99
+ file = "test_device.py" ,
100
+ )
101
+ def test_devices (collect_tests , file , cmds , selection ):
102
+ collection = collect_tests (file , cmds )
103
+ assert collection == selection
104
+
105
+
106
+ @make_parametrization (
107
+ Config (
108
+ new_cmds = ("-k" , "float16" ),
109
+ legacy_cmds = ("-k" , "float16" ),
110
+ selection = (
111
+ "::TestFooCPU::test_bar_cpu_float16" ,
112
+ "::TestFooCPU::test_bar_cpu_float16" ,
113
+ ),
114
+ ),
115
+ Config (
116
+ new_cmds = ("-k" , "int32" ),
117
+ legacy_cmds = ("-k" , "int32" ),
118
+ selection = (
119
+ "::TestFooCPU::test_bar_cpu_int32" ,
120
+ "::TestFooCPU::test_bar_cpu_int32" ,
121
+ ),
122
+ ),
123
+ file = "test_dtype.py" ,
124
+ )
125
+ def test_dtypes (collect_tests , file , cmds , selection ):
126
+ collection = collect_tests (file , cmds )
127
+ assert collection == selection
128
+
129
+
130
+ @make_parametrization (
131
+ Config (
132
+ new_cmds = ("-k" , "add" ),
133
+ legacy_cmds = ("-k" , "add" ),
134
+ selection = (
135
+ "::TestFooCPU::test_bar_add_cpu_float32" ,
136
+ "::TestFooCPU::test_bar_add_with_alpha_cpu_float32" ,
137
+ ),
138
+ ),
139
+ Config (
140
+ new_cmds = ("-k" , "sub" ),
141
+ legacy_cmds = ("-k" , "sub" ),
142
+ selection = (
143
+ "::TestFooCPU::test_bar_sub_cpu_float32" ,
144
+ "::TestFooCPU::test_bar_sub_with_alpha_cpu_float32" ,
145
+ ),
146
+ ),
147
+ file = "test_op_infos.py" ,
148
+ )
149
+ def test_op_infos (collect_tests , file , cmds , selection ):
150
+ collection = collect_tests (file , cmds )
151
+ assert collection == selection
152
+
153
+
77
154
@make_parametrization (
78
155
Config (
79
156
selection = (
0 commit comments