Skip to content

Commit df350cd

Browse files
authored
Merge pull request #5898 from MetRonnie/integration-reftest
Replace more functional reftests with integration reftests
2 parents 1c1e840 + d4a9d0a commit df350cd

40 files changed

+310
-474
lines changed

cylc/flow/cycling/iso8601.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ def from_nonstandard_string(cls, point_string):
8888

8989
def add(self, other):
9090
"""Add an Interval to self."""
91-
return ISO8601Point(self._iso_point_add(self.value, other.value))
91+
return ISO8601Point(self._iso_point_add(
92+
self.value, other.value, CALENDAR.mode
93+
))
9294

9395
def standardise(self):
9496
"""Reformat self.value into a standard representation."""
@@ -106,41 +108,43 @@ def standardise(self):
106108
def sub(self, other):
107109
"""Subtract a Point or Interval from self."""
108110
if isinstance(other, ISO8601Point):
109-
return ISO8601Interval(
110-
self._iso_point_sub_point(self.value, other.value))
111-
return ISO8601Point(
112-
self._iso_point_sub_interval(self.value, other.value))
111+
return ISO8601Interval(self._iso_point_sub_point(
112+
self.value, other.value, CALENDAR.mode
113+
))
114+
return ISO8601Point(self._iso_point_sub_interval(
115+
self.value, other.value, CALENDAR.mode
116+
))
113117

114118
@staticmethod
115119
@lru_cache(10000)
116-
def _iso_point_add(point_string, interval_string):
120+
def _iso_point_add(point_string, interval_string, _calendar_mode):
117121
"""Add the parsed point_string to the parsed interval_string."""
118122
point = point_parse(point_string)
119123
interval = interval_parse(interval_string)
120124
return str(point + interval)
121125

122126
def _cmp(self, other: 'ISO8601Point') -> int:
123-
return self._iso_point_cmp(self.value, other.value)
127+
return self._iso_point_cmp(self.value, other.value, CALENDAR.mode)
124128

125129
@staticmethod
126130
@lru_cache(10000)
127-
def _iso_point_cmp(point_string, other_point_string):
131+
def _iso_point_cmp(point_string, other_point_string, _calendar_mode):
128132
"""Compare the parsed point_string to the other one."""
129133
point = point_parse(point_string)
130134
other_point = point_parse(other_point_string)
131135
return cmp(point, other_point)
132136

133137
@staticmethod
134138
@lru_cache(10000)
135-
def _iso_point_sub_interval(point_string, interval_string):
139+
def _iso_point_sub_interval(point_string, interval_string, _calendar_mode):
136140
"""Return the parsed point_string minus the parsed interval_string."""
137141
point = point_parse(point_string)
138142
interval = interval_parse(interval_string)
139143
return str(point - interval)
140144

141145
@staticmethod
142146
@lru_cache(10000)
143-
def _iso_point_sub_point(point_string, other_point_string):
147+
def _iso_point_sub_point(point_string, other_point_string, _calendar_mode):
144148
"""Return the difference between the two parsed point strings."""
145149
point = point_parse(point_string)
146150
other_point = point_parse(other_point_string)

tests/functional/cyclers/21-360_calendar.t

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/functional/cyclers/21-360_calendar/flow.cylc

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/functional/cyclers/21-360_calendar/graph.plain.ref

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/functional/cyclers/21-360_calendar/reference.log

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/functional/cyclers/36-icp_fcp_notation.t

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/functional/cyclers/36-icp_fcp_notation/flow.cylc

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/functional/cyclers/36-icp_fcp_notation/reference.log

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/functional/cyclers/47-icp_fcp_notation.t

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/functional/cyclers/47-icp_fcp_notation/flow.cylc

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)