diff --git a/tests/unit/test_base.py b/tests/unit/test_base.py index ad4ce6739..d8e152fa4 100644 --- a/tests/unit/test_base.py +++ b/tests/unit/test_base.py @@ -464,6 +464,73 @@ def test_file_with_starting_time_and_timestamps_in_construct_mode(self): timestamps=[1, 2, 3, 4, 5] ) + def test_repr_html(self): + """ Test that html representation of linked timestamp data will occur as expected and will not cause a Recursion + Error + """ + data1 = [0, 1, 2, 3] + data2 = [4, 5, 6, 7] + timestamps = [0.0, 0.1, 0.2, 0.3] + ts1 = TimeSeries(name="test_ts1", data=data1, unit="grams", timestamps=timestamps) + ts2 = TimeSeries(name="test_ts2", data=data2, unit="grams", timestamps=ts1) + expected_output = ('\n \n \n \n

test_ts2 (TimeSeries)

resolution: ' + '-1.0
comments: no comments
description: ' + 'no description
conversion: ' + '1.0
offset: 0.0
unit: grams
data
0: 4
1: 5
2: 6
3: ' + '7
timestamps (link to /test_ts1)
0: 0.0
1: 0.1
2: 0.2
3: 0.3
timestamps_unit: seconds
interval: 1
') + assert ts2._repr_html_() == expected_output + class TestImage(TestCase): def test_init(self):