From 31ac1b5c34a8cd0200752283d889e0dd032fed7f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 07:40:10 +0100 Subject: [PATCH 1/3] Test segments --- pyxdf/test/test_data.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyxdf/test/test_data.py b/pyxdf/test/test_data.py index 5c5b1ce..6c8de1c 100644 --- a/pyxdf/test/test_data.py +++ b/pyxdf/test/test_data.py @@ -88,3 +88,5 @@ def test_load_file(file): np.testing.assert_array_equal(streams[1]["clock_times"], clock_times) np.testing.assert_array_almost_equal(streams[1]["clock_values"], clock_values) + + assert s[0]["info"]["segments"] == [(0, 0), (1, 3), (4, 8)] From 521291bafae4341bdabbce6381bb44680e26abf6 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 07:43:38 +0100 Subject: [PATCH 2/3] Use suitable arguments --- pyxdf/test/test_data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyxdf/test/test_data.py b/pyxdf/test/test_data.py index 6c8de1c..70c32ff 100644 --- a/pyxdf/test/test_data.py +++ b/pyxdf/test/test_data.py @@ -89,4 +89,7 @@ def test_load_file(file): np.testing.assert_array_equal(streams[1]["clock_times"], clock_times) np.testing.assert_array_almost_equal(streams[1]["clock_values"], clock_values) + streams, header = load_xdf( + file, jitter_break_threshold_seconds=0.001, jitter_break_threshold_samples=1 + ) assert s[0]["info"]["segments"] == [(0, 0), (1, 3), (4, 8)] From fe9989d8e0e090c8234d4d862c1d86fc523eb928 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 07:45:22 +0100 Subject: [PATCH 3/3] Fix test --- pyxdf/test/test_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyxdf/test/test_data.py b/pyxdf/test/test_data.py index 70c32ff..74c87f5 100644 --- a/pyxdf/test/test_data.py +++ b/pyxdf/test/test_data.py @@ -92,4 +92,4 @@ def test_load_file(file): streams, header = load_xdf( file, jitter_break_threshold_seconds=0.001, jitter_break_threshold_samples=1 ) - assert s[0]["info"]["segments"] == [(0, 0), (1, 3), (4, 8)] + assert streams[0]["info"]["segments"] == [(0, 0), (1, 3), (4, 8)]