forked from M-Labs/artiq
1
0
Fork 0

test/sawg: patch delay_mu

This commit is contained in:
Robert Jördens 2017-06-21 14:38:13 +02:00
parent 570f2cc1ff
commit 5f6e665158
1 changed files with 4 additions and 1 deletions

View File

@ -20,10 +20,13 @@ class RTIOManager:
def rtio_output_wide(self, *args, **kwargs):
self.rtio_output(*args, **kwargs)
def delay_mu(self, t):
delay(t)
def patch(self, mod):
assert not hasattr(mod, "_saved")
mod._saved = {}
for name in "rtio_output rtio_output_wide".split():
for name in "rtio_output rtio_output_wide delay_mu".split():
mod._saved[name] = getattr(mod, name, None)
setattr(mod, name, getattr(self, name))