Skip to content

Commit

Permalink
worker, scheduler: fix unit tests on Windows
Browse files Browse the repository at this point in the history
fallen committed Aug 27, 2015
1 parent 7db0498 commit 4a16ea1
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion artiq/test/scheduler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest
import asyncio
import sys
import os
from time import time, sleep

from artiq import *
@@ -63,7 +64,10 @@ def _get_basic_steps(rid, expid, priority=0, flush=False):

class SchedulerCase(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
if os.name == "nt":
self.loop = asyncio.ProactorEventLoop()
else:
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(self.loop)

def test_steps(self):
6 changes: 5 additions & 1 deletion artiq/test/worker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest
import asyncio
import sys
import os
from time import sleep

from artiq import *
@@ -59,7 +60,10 @@ def _run_experiment(class_name):

class WatchdogCase(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
if os.name == "nt":
self.loop = asyncio.ProactorEventLoop()
else:
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(self.loop)

def test_watchdog_no_timeout(self):

0 comments on commit 4a16ea1

Please sign in to comment.