Skip to content

Commit 25b1dce

Browse files
committed
Reduce number of dummy backends
1 parent 00f79d3 commit 25b1dce

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

asv_bench/benchmarks/plotting.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
DataFrame,
1010
DatetimeIndex,
1111
Series,
12-
__file__ as pd_file,
1312
date_range,
1413
)
1514

@@ -113,11 +112,6 @@ class BackendLoading:
113112

114113
def setup(self):
115114
dist = pkg_resources.get_distribution("pandas")
116-
if dist.module_path not in pd_file:
117-
# We are running from a non-installed pandas, and this benchmark is
118-
# invalid
119-
raise NotImplementedError("Testing a non-installed pandas")
120-
121115
spec = importlib.machinery.ModuleSpec("my_backend", None)
122116
mod = importlib.util.module_from_spec(spec)
123117
mod.plot = lambda *args, **kwargs: 1
@@ -127,7 +121,7 @@ def setup(self):
127121
"pandas_plotting_backend", mod.__name__, dist=dist
128122
)
129123
backends["pandas_plotting_backends"][mod.__name__] = my_entrypoint
130-
for i in range(1000):
124+
for i in range(10):
131125
backends["pandas_plotting_backends"][str(i)] = my_entrypoint
132126
sys.modules["my_backend"] = mod
133127

0 commit comments

Comments
 (0)