sofarocean / spotter-sd-parser

Open source tool for concatenating and parsing SD card data from Spotters
Apache License 2.0
9 stars 5 forks source link

Fix location.csv output from V3 datasets & add unit test coverage #25

Closed tcj closed 1 month ago

tcj commented 1 month ago

Original fix by @pieterbartsmit

before fix:

% python3 -m unittest -vv tests/test_loc.py
[...]
FAIL: testOutputLocationIsValidFloat (tests.test_loc.LocationParsingTest.testOutputLocationIsValidFloat)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/tcj/src/spotter-sd-parser/tests/test_loc.py", line 33, in testOutputLocationIsValidFloat
    self.assertFalse(firstline.rstrip().endswith(',  37.00000000,-122.00000000'))
AssertionError: True is not false

----------------------------------------------------------------------
Ran 3 tests in 0.192s

FAILED (failures=1, skipped=2)

after fix:

% python3 -m unittest -vv tests/test_loc.py
[...]
Ran 3 tests in 0.205s

OK