Skip to content

Commit

Permalink
test_scheduler: Rename SchedulerMonitor.schedulers to experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepskyhunter committed Jul 13, 2022
1 parent e9b1383 commit 1b06ab3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions artiq/test/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ def get(self):
class SchedulerMonitor():
def __init__(self, expect_status):
self.expect_status = expect_status
self.schedulers = {}
self.experiments = {}
self.current_status = {}

def check_status(self, test):
for key, value in self.schedulers.items():
for key, value in self.experiments.items():
if key not in self.current_status.keys():
self.current_status[key] = ""
if self.schedulers[key]["status"] != self.current_status[key]:
test.assertEqual(self.schedulers[key]["status"], self.expect_status[key][0])
if self.experiments[key]["status"] != self.current_status[key]:
test.assertEqual(self.experiments[key]["status"], self.expect_status[key][0])
self.current_status[key] = self.expect_status[key].pop(0)

def finished(self, test):
Expand Down Expand Up @@ -178,7 +178,7 @@ def test_pending_priority(self):
done = asyncio.Event()

def notify(mod):
process_mod(scheduler_mon.schedulers, mod)
process_mod(scheduler_mon.experiments, mod)
scheduler_mon.check_status(self)

if scheduler_mon.finished(self):
Expand Down

0 comments on commit 1b06ab3

Please sign in to comment.