Skip to content

Commit

Permalink
Add unittest to downsample1d multi
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Aug 15, 2023
1 parent 4d3bf19 commit 808f5d7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions holoviews/tests/operation/test_downsample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pytest

import holoviews as hv
from holoviews.operation.downsample import downsample1d


@pytest.mark.parametrize("plottype", ["overlay", "ndoverlay"])
def test_downsample1d_multi(plottype):
N = 1000
assert N > downsample1d.width

if plottype == "overlay":
figure = hv.Overlay([hv.Curve(range(N)), hv.Curve(range(N))])
elif plottype == "ndoverlay":
figure = hv.NdOverlay({"A": hv.Curve(range(N)), "B": hv.Curve(range(N))})

figure_values = downsample1d(figure, dynamic=False).data.values()
for n in figure_values:
for value in n.data.values():
assert value.size == downsample1d.width

0 comments on commit 808f5d7

Please sign in to comment.