@@ -118,9 +118,14 @@ def test_bar(x: str):
118
118
)
119
119
)
120
120
_write_config (tmp_path , {"typeCheckingMode" : "strict" })
121
- assert any (
122
- e ["message" ].startswith ('No overloads for "given" match the provided arguments' )
123
- for e in _get_pyright_errors (file )
121
+ assert (
122
+ sum (
123
+ e ["message" ].startswith (
124
+ 'No overloads for "given" match the provided arguments'
125
+ )
126
+ for e in _get_pyright_errors (file )
127
+ )
128
+ == 1
124
129
)
125
130
126
131
@@ -155,11 +160,14 @@ def test_pyright_tuples_pos_args_only(tmp_path: Path):
155
160
)
156
161
)
157
162
_write_config (tmp_path , {"typeCheckingMode" : "strict" })
158
- assert any (
159
- e ["message" ].startswith (
160
- 'No overloads for "tuples" match the provided arguments'
163
+ assert (
164
+ sum (
165
+ e ["message" ].startswith (
166
+ 'No overloads for "tuples" match the provided arguments'
167
+ )
168
+ for e in _get_pyright_errors (file )
161
169
)
162
- for e in _get_pyright_errors ( file )
170
+ == 2
163
171
)
164
172
165
173
@@ -176,11 +184,14 @@ def test_pyright_one_of_pos_args_only(tmp_path: Path):
176
184
)
177
185
)
178
186
_write_config (tmp_path , {"typeCheckingMode" : "strict" })
179
- assert any (
180
- e ["message" ].startswith (
181
- 'No overloads for "one_of" match the provided arguments'
187
+ assert (
188
+ sum (
189
+ e ["message" ].startswith (
190
+ 'No overloads for "one_of" match the provided arguments'
191
+ )
192
+ for e in _get_pyright_errors (file )
182
193
)
183
- for e in _get_pyright_errors ( file )
194
+ == 2
184
195
)
185
196
186
197
0 commit comments