diff --git a/pymeos/collections/time/datespanset.py b/pymeos/collections/time/datespanset.py index 9159021f..95fb60b5 100644 --- a/pymeos/collections/time/datespanset.py +++ b/pymeos/collections/time/datespanset.py @@ -100,7 +100,7 @@ def to_span(self) -> DateSpan: MEOS Functions: spanset_span """ - from .dateset import DateSpan + from .datespan import DateSpan return DateSpan(_inner=super().to_span()) diff --git a/tests/collections/time/datespanset_test.py b/tests/collections/time/datespanset_test.py index 73f47d95..aa0b2d5f 100644 --- a/tests/collections/time/datespanset_test.py +++ b/tests/collections/time/datespanset_test.py @@ -34,6 +34,13 @@ def test_shift_scale_below_a_day(self, delta): value.scale(delta) +class TestDateSpanSetConversions(TestDateSpanSet): + # The span of a date span set, as #TestCollectionConversions.test_to_span of + # dateset_test.py checks the span of a date set + def test_to_span(self): + assert self.date_spanset.to_span() == DateSpan("[2019-09-08, 2019-09-14]") + + class TestDateSpanSetAccessors(TestDateSpanSet): # The dates of a date span set are the bounds of its spans, answered as a # list as #TestDateSetAccessors.test_elements answers the elements of a set