From 217d310ca473bcc7ef050987b4afb78926be83cf Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 28 Apr 2022 14:13:29 +0100 Subject: [PATCH] tests: test for _intersection_idx extended. --- tests/obs_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/obs_test.py b/tests/obs_test.py index c2d161e4..8f32bd77 100644 --- a/tests/obs_test.py +++ b/tests/obs_test.py @@ -521,6 +521,9 @@ def test_intersection_idx(): assert pe.obs._intersection_idx([range(10, 1010, 10), range(10, 1010, 50)]) == range(10, 1010, 50) assert pe.obs._intersection_idx([range(500, 6050, 50), range(500, 6250, 250)]) == range(500, 6050, 250) + for ids in [[list(range(1, 80, 3)), list(range(1, 100, 2))], [range(1, 80, 3), range(1, 100, 2), range(1, 100, 7)]]: + assert list(pe.obs._intersection_idx(ids)) == pe.obs._intersection_idx([list(o) for o in ids]) + def test_intersection_collapse(): range1 = range(1, 2000, 2)