PEP8 fixes

lambdas and coverage
This commit is contained in:
Roman Zeyde
2015-02-07 08:52:27 +02:00
parent 5b94d7fd49
commit a2b220c8e4
4 changed files with 18 additions and 4 deletions

View File

@@ -48,7 +48,9 @@ def test_qam():
decoded = list(q.decode(S))
assert decoded == bits
noise = lambda A: A*(r.uniform(-1, 1) + 1j*r.uniform(-1, 1))
def noise(A):
return A*(r.uniform(-1, 1) + 1j*r.uniform(-1, 1))
noised_symbols = [(s + noise(1e-3)) for s in S]
decoded = list(q.decode(noised_symbols))
assert decoded == bits