diff --git a/amodem/tests/test_calib.py b/amodem/tests/test_calib.py index d01d8cb..03855ca 100644 --- a/amodem/tests/test_calib.py +++ b/amodem/tests/test_calib.py @@ -19,14 +19,6 @@ class ProcessMock(object): self.stdout = self self.bytes_per_sample = 2 - def launch(self, *args, **kwargs): - return self - - __call__ = launch - - def kill(self): - pass - def write(self, data): assert self.buf.tell() < 10e6 self.buf.write(data) diff --git a/amodem/tests/test_stream.py b/amodem/tests/test_stream.py index e959f3c..848e33c 100644 --- a/amodem/tests/test_stream.py +++ b/amodem/tests/test_stream.py @@ -29,7 +29,6 @@ def test_read(): j += 1 try: - for buf in f: - pass + next(f) except IOError as e: assert e.args == ('timeout',) diff --git a/amodem/tests/test_transfer.py b/amodem/tests/test_transfer.py index 057d5d9..308053e 100644 --- a/amodem/tests/test_transfer.py +++ b/amodem/tests/test_transfer.py @@ -14,15 +14,7 @@ logging.basicConfig(level=logging.DEBUG, # useful for debugging format='%(asctime)s %(levelname)-12s %(message)s') -class Args(object): - def __init__(self, **kwargs): - self.__dict__.update(kwargs) - - def __getattr__(self, name): - return None - - -def run(size, chan=None, df=0, success=True, reader=None, cfg=None): +def run(size, chan=None, df=0, success=True, cfg=None): if cfg is None: cfg = config.fastest() tx_data = os.urandom(size) @@ -43,8 +35,6 @@ def run(size, chan=None, df=0, success=True, reader=None, cfg=None): rx_data = BytesIO() dump = BytesIO() - if reader: - rx_audio = reader(rx_audio) try: result = main.recv(config=cfg, src=rx_audio, dst=rx_data, dump_audio=dump, pylab=None)