@@ -45,14 +45,21 @@ def test_main(self):
4545 executed_command = self .commands [self .commands_uid .index (uid )]
4646
4747 # Since the command was run twice.
48- for _ in range (2 ):
48+ for i in range (2 ):
4949 # First line is the datetime of the executed command in comment.
5050 line = logfile .readline ().strip ()
51- assert_true (time .strftime ("## %Y-%m-%d %H:%M:" ) in line ) # Don't check seconds.
51+
52+ if i == 0 :
53+ assert_true ("Started" in line )
54+ else :
55+ assert_true ("Resumed" in line )
56+
57+ assert_true (line .startswith ("## SMART_DISPATCH" ))
58+ assert_true (time .strftime ("%Y-%m-%d %H:%M:" ) in line ) # Don't check seconds.
5259
5360 # Second line is the executed command in comment.
5461 line = logfile .readline ().strip ()
55- assert_equal ( line , "# " + executed_command )
62+ assert_true ( executed_command in line )
5663
5764 # Next should be the command's output
5865 line = logfile .readline ().strip ()
@@ -73,14 +80,21 @@ def test_main(self):
7380 executed_command = self .commands [self .commands_uid .index (uid )]
7481
7582 # Since the command was run twice.
76- for _ in range (2 ):
83+ for i in range (2 ):
7784 # First line is the datetime of the executed command in comment.
7885 line = logfile .readline ().strip ()
79- assert_true (time .strftime ("## %Y-%m-%d %H:%M:" ) in line ) # Don't check seconds.
86+
87+ if i == 0 :
88+ assert_true ("Started" in line )
89+ else :
90+ assert_true ("Resumed" in line )
91+
92+ assert_true (line .startswith ("## SMART_DISPATCH" ))
93+ assert_true (time .strftime ("%Y-%m-%d %H:%M:" ) in line ) # Don't check seconds.
8094
8195 # Second line is the executed command in comment.
8296 line = logfile .readline ().strip ()
83- assert_equal ( line , "# " + executed_command )
97+ assert_true ( executed_command in line )
8498
8599 # Empty line
86100 assert_equal (logfile .readline ().strip (), "" )
0 commit comments