File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ def unique_by(x: Hashable) -> Hashable:
21
21
@settings (deadline = None )
22
22
@given (
23
23
providers = st .lists (
24
- st .sampled_from (onnxruntime .get_all_providers ()).filter (
25
- lambda x : x not in onnxruntime .get_available_providers ()
26
- ),
24
+ st .sampled_from (onnxruntime .get_available_providers ()),
27
25
unique_by = unique_by ,
28
26
min_size = 1 ,
29
27
)
@@ -37,9 +35,7 @@ def test_unavailable_provider_multiple(providers: List[str]) -> None:
37
35
38
36
@given (
39
37
providers = st .lists (
40
- st .sampled_from (onnxruntime .get_all_providers ()).filter (
41
- lambda x : x in onnxruntime .get_available_providers ()
42
- ),
38
+ st .sampled_from (onnxruntime .get_available_providers ()),
43
39
min_size = 1 ,
44
40
unique_by = unique_by ,
45
41
)
@@ -56,9 +52,7 @@ def test_warning_no_providers_supplied() -> None:
56
52
57
53
@given (
58
54
providers = st .lists (
59
- st .sampled_from (onnxruntime .get_all_providers ()).filter (
60
- lambda x : x in onnxruntime .get_available_providers ()
61
- ),
55
+ st .sampled_from (onnxruntime .get_available_providers ()),
62
56
min_size = 1 ,
63
57
).filter (lambda x : len (x ) > len (set (x )))
64
58
)
You can’t perform that action at this time.
0 commit comments