Skip to content

Commit 51c80af

Browse files
committed
Fix tests of wifi80211 to take in account the full results
1 parent 48eaab8 commit 51c80af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

commpy/tests/test_wifi80211.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
def test_wifi80211_siso_channel():
1717
seed(17121996)
1818
wifi80211 = Wifi80211(1)
19-
BERs = wifi80211.link_performance(SISOFlatChannel(fading_param=(1 + 0j, 0)), range(0, 9, 2), 10 ** 4, 600)
19+
BERs = wifi80211.link_performance(SISOFlatChannel(fading_param=(1 + 0j, 0)), range(0, 9, 2), 10 ** 4, 600)[0]
2020
desired = (0.489, 0.503, 0.446, 0.31, 0.015) # From previous tests
21-
for i, val in enumerate(desired):
22-
print((BERs[i] - val) / val)
21+
# for i, val in enumerate(desired):
22+
# print((BERs[i] - val) / val)
2323
assert_allclose(BERs, desired, rtol=0.3,
2424
err_msg='Wrong performance for SISO QPSK and AWGN channel')
2525

@@ -37,7 +37,7 @@ def receiver(y, h, constellation, noise_var):
3737
return modem.demodulate(kbest(y, h, constellation, 16), 'hard')
3838

3939
BERs = wifi80211.link_performance(RayleighChannel, arange(0, 21, 5) + 10 * log10(modem.num_bits_symbol), 10 ** 4,
40-
600, receiver=receiver)
40+
600, receiver=receiver)[0]
4141
desired = (0.535, 0.508, 0.521, 0.554, 0.475) # From previous test
4242
assert_allclose(BERs, desired, rtol=1.25,
4343
err_msg='Wrong performance for MIMO 16QAM and 4x4 Rayleigh channel')

0 commit comments

Comments
 (0)