Beispiel #1
0
 def test_remembers_oldest_from_previous_runs(self):
     filter = archivist.OldestUnfinishedRun()
     list(filter.process([('run-3', run_3)]))
     list(filter.process([]))
     assert filter.next_start() == '2020-10-31T23:40:00+0000'
Beispiel #2
0
 def test_oldest_unfinished_runs(self):
     filter = archivist.OldestUnfinishedRun()
     list(filter.process([('run-1', run_1), ('run-4', run_4)]))
     assert filter.next_start() == '2020-10-31T23:39:00+0000'
Beispiel #3
0
 def test_when_only_finished_runs_it_says_first_is_oldest(self):
     filter = archivist.OldestUnfinishedRun()
     list(filter.process([('run-3', run_3)]))
     assert filter.next_start() == '2020-10-31T23:40:00+0000'
Beispiel #4
0
 def test_no_oldest_when_no_input(self):
     filter = archivist.OldestUnfinishedRun()
     filter.process([])
     assert filter.next_start() == None
Beispiel #5
0
 def test_forwards_input(self):
     filter = archivist.OldestUnfinishedRun()
     input = [('run-1', run_1), ('run-4', run_4)]
     output = list(filter.process(input))
     assert input == output
Beispiel #6
0
def remember_oldest():
    return archivist.OldestUnfinishedRun()