File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,9 @@ def __str__(self):
9393
9494
9595def test_all_examples_tested ():
96- num_dirs = len ([d for d in os .listdir (EXAMPLES_ROOT ) if os .path .isdir (os .path .join (EXAMPLES_ROOT , d ))])
97- assert num_dirs == len (EXAMPLES ), "Not all examples are being tested!"
96+ tested_examples = set (os .path .relpath (example .path , EXAMPLES_ROOT ) for example in EXAMPLES )
97+ all_examples = set (d for d in os .listdir (EXAMPLES_ROOT ) if os .path .isdir (os .path .join (EXAMPLES_ROOT , d )))
98+ assert tested_examples == all_examples , "Not all examples are being tested!"
9899
99100
100101# We want to test our examples with both the latest commit and public build.
Original file line number Diff line number Diff line change @@ -222,8 +222,7 @@ def test_datatype_constraints(case: DtypeConstraintCase):
222222 outputs = make_list (case .func (** inputs ))
223223
224224 # Some APIs do not generate Tensor outputs (e.g. `allclose`), so we don't need to evaluate those.
225- # For DimensionSizes, we don't need to check the type either (they can only be one type)
226- if not any (type (out ) == tp .Tensor for out in outputs ):
225+ if not any (isinstance (out , tp .Tensor ) for out in outputs ):
227226 return
228227
229228 expected_return_types = [
You can’t perform that action at this time.
0 commit comments