File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change 3
3
import subprocess
4
4
import sys
5
5
from importlib .metadata import EntryPoint
6
- from typing import NamedTuple
7
6
8
7
import pytest
9
8
from pytest import param
@@ -37,24 +36,12 @@ def test_missing_backend():
37
36
38
37
39
38
def test_multiple_backends (mocker ):
40
- class Distribution (NamedTuple ):
41
- entry_points : list [EntryPoint ]
42
-
43
- entrypoints = [
44
- EntryPoint (
45
- name = "foo" ,
46
- value = "ibis.backends.backend1" ,
47
- group = "ibis.backends" ,
48
- ),
49
- EntryPoint (
50
- name = "foo" ,
51
- value = "ibis.backends.backend2" ,
52
- group = "ibis.backends" ,
53
- ),
39
+ return_value = [
40
+ EntryPoint (name = "foo" , value = "ibis.backends.backend1" , group = "ibis.backends" ),
41
+ EntryPoint (name = "foo" , value = "ibis.backends.backend2" , group = "ibis.backends" ),
54
42
]
55
- return_value = entrypoints
56
43
57
- mocker .patch ("importlib.metadata.entry_points " , return_value = return_value )
44
+ mocker .patch ("ibis.util.backend_entry_points " , return_value = return_value )
58
45
59
46
msg = r"\d+ packages found for backend 'foo'"
60
47
with pytest .raises (RuntimeError , match = msg ):
You can’t perform that action at this time.
0 commit comments