From 1248a77848f2f6b6ee3b37988d78823bd1d8952c Mon Sep 17 00:00:00 2001 From: Jeremy Fee <jmfee@usgs.gov> Date: Tue, 17 Dec 2019 15:26:41 -0700 Subject: [PATCH] Fix IMFV283Parser test --- test/imfv283_test/IMFV283Parser_test.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/test/imfv283_test/IMFV283Parser_test.py b/test/imfv283_test/IMFV283Parser_test.py index 2d159f420..d65c681e2 100644 --- a/test/imfv283_test/IMFV283Parser_test.py +++ b/test/imfv283_test/IMFV283Parser_test.py @@ -1,4 +1,6 @@ """Tests for the IMFV283 Parser class.""" +from __future__ import unicode_literals +from builtins import str from nose.tools import assert_equals from obspy import UTCDateTime @@ -6,15 +8,15 @@ from obspy import UTCDateTime from geomagio.imfv283 import IMFV283Parser, imfv283_codes -IMFV283_EXAMPLE_VIC = '75C2A3A814023012741G43-1NN027EUP00191`A^P@RVxZ}|' + \ - 'D@@B_BEM@@@@@@@@@@@@@@@@@@@@@@@@@@@E|BxtTADVD@\\E\\BxxT@tVCh\\E' + \ - 'lByDT@xVCp\\EdBy@T@tVCh\\EhByPT@xVCl\\EPBy@T@tVCd\\EdBxlTA@VCp\\Eh' + \ - 'BxTTA@VCp\\EdBGxTA@VCl\\EPBG`T@xVC\\\\DtBGHT@lVCD\\DPBG@T@XVBh\\' +IMFV283_EXAMPLE_VIC = b'75C2A3A814023012741G43-1NN027EUP00191`A^P@RVxZ}|' + \ + b'D@@B_BEM@@@@@@@@@@@@@@@@@@@@@@@@@@@E|BxtTADVD@\\E\\BxxT@tVCh\\E' + \ + b'lByDT@xVCp\\EdBy@T@tVCh\\EhByPT@xVCl\\EPBy@T@tVCd\\EdBxlTA@VCp\\Eh' + \ + b'BxTTA@VCp\\EdBGxTA@VCl\\EPBG`T@xVC\\\\DtBGHT@lVCD\\DPBG@T@XVBh\\' -IMFV283_EXAMPLE_FRD = '75C2102614023012927G43-0NN027EUP00191bx@WyhD{' + \ - 'aDB~@X@{Bb@@@@@@@@@@@@@@@@@@@@@@@@@@@@[DAV[@cUAjT@[EAVZ@cUAjT@[' + \ - 'BAVZ@cVAjS@[DAVZ@cUAjS@[DAVZ@cUAjS@[GAV\\@cTAjT@[DAV[@cUAjT@[BAVY' + \ - '@cVAjT@[CAVW@cWAjT@[CAVT@cWAjU@[AAVO@cYAjV@Z}AVK@c[AjV' +IMFV283_EXAMPLE_FRD = b'75C2102614023012927G43-0NN027EUP00191bx@WyhD{' + \ + b'aDB~@X@{Bb@@@@@@@@@@@@@@@@@@@@@@@@@@@@[DAV[@cUAjT@[EAVZ@cUAjT@[' + \ + b'BAVZ@cVAjS@[DAVZ@cUAjS@[DAVZ@cUAjS@[GAV\\@cTAjT@[DAV[@cUAjT@[BAVY' + \ + b'@cVAjT@[CAVW@cWAjT@[CAVT@cWAjU@[AAVO@cYAjV@Z}AVK@c[AjV' def test_parse_msg_header(): @@ -44,7 +46,7 @@ def test_estimate_data_time__correct_doy(): """ parser = IMFV283Parser() # BOU aka normal - transmission = '17274013121' + transmission = b'17274013121' day = 274 minute = 72 (data_time, transmit_time, corrected) = \ @@ -61,7 +63,7 @@ def test_estimate_data_time__incorrect_doy(): """ parser = IMFV283Parser() # BLC aka 1999 rollover gps issue - transmission = '17274013241' + transmission = b'17274013241' day = 46 minute = 78 (data_time, transmit_time, corrected) = \ -- GitLab