Skip to content

Commit c98e08f

Browse files
committedApr 19, 2015
fix transforms unittest
1 parent 0b8d496 commit c98e08f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

Diff for: ‎artiq/coredevice/comm_dummy.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77

88
class _RuntimeEnvironment(LinkInterface):
9-
def __init__(self, ref_period):
10-
self.internal_ref_period = ref_period
9+
def __init__(self):
1110
self.warmup_time = 1*ms
1211

1312
def emit_object(self):
@@ -16,7 +15,7 @@ def emit_object(self):
1615

1716
class Comm(AutoDB):
1817
def get_runtime_env(self):
19-
return _RuntimeEnvironment(1*ns)
18+
return _RuntimeEnvironment()
2019

2120
def switch_clock(self, external):
2221
pass

Diff for: ‎artiq/test/transforms.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import unittest
22
import ast
33

4+
from artiq import ns
45
from artiq.coredevice import comm_dummy, core
56
from artiq.transforms.unparse import unparse
67

@@ -39,7 +40,7 @@ def run():
3940

4041
class OptimizeCase(unittest.TestCase):
4142
def test_optimize(self):
42-
coredev = core.Core(comm=comm_dummy.Comm())
43+
coredev = core.Core(comm=comm_dummy.Comm(), ref_period=1*ns)
4344
func_def = ast.parse(optimize_in).body[0]
4445
coredev.transform_stack(func_def, dict(), dict())
4546
self.assertEqual(unparse(func_def), optimize_out)

0 commit comments

Comments
 (0)
Please sign in to comment.