merge in watterso_setup_automated_testing

added .idea to .gitignore for pycharm
pulled tests out of run.py, created adsb_test, ehs_test, and util test
moved the rest of runp.py into decode_test_data
changed imports and __init__ file so it doesn't contain magic
This commit is contained in:
James Watterson
2016-09-11 20:48:43 -07:00
parent 240f706e81
commit 23192a97fd
11 changed files with 213 additions and 211 deletions
+15
View File
@@ -0,0 +1,15 @@
from pyModeS import util
def test_hex2bin():
assert util.hex2bin('6E406B') == "011011100100000001101011"
def test_crc_decode():
checksum = util.crc("8D406B902015A678D4D220AA4BDA")
assert checksum == "000000000000000000000000"
def test_crc_encode():
parity = util.crc("8D406B902015A678D4D220AA4BDA", encode=True)
assert util.hex2bin("AA4BDA") == parity