mirror of
https://github.com/romanz/amodem.git
synced 2026-02-06 08:38:06 +08:00
tests: remove unused code
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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',)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user