2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

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

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))