Skip to content

Commit 035572f

Browse files
committed
Add test
1 parent 6edab30 commit 035572f

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tests/unit/test_task_trigger.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,16 @@
1414
# You should have received a copy of the GNU General Public License
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
from cylc.flow.cycling.loader import get_point, get_sequence
18-
from cylc.flow.task_trigger import TaskTrigger, Dependency
17+
from cylc.flow.cycling.integer import IntegerPoint
18+
from cylc.flow.cycling.loader import (
19+
get_point,
20+
get_sequence,
21+
)
1922
from cylc.flow.task_outputs import TaskOutputs
23+
from cylc.flow.task_trigger import (
24+
Dependency,
25+
TaskTrigger,
26+
)
2027

2128

2229
def test_check_with_cycle_point():
@@ -171,3 +178,11 @@ def test_str(set_cycling_type):
171178

172179
trigger = TaskTrigger('name', None, 'output')
173180
assert str(trigger) == 'name:output'
181+
182+
183+
def test_eq():
184+
args = ('foo', '+P1', 'succeeded')
185+
assert TaskTrigger(*args) == TaskTrigger(*args)
186+
assert TaskTrigger(*args) != TaskTrigger(
187+
*args, initial_point=IntegerPoint('1')
188+
)

0 commit comments

Comments
 (0)