Exemple #1
0
    def _build_parser(self, stream_handle):

        parser = FlortKnAuvParser(stream_handle,
                                  self._exception_callback,
                                  is_telemetered=True)

        return parser
Exemple #2
0
    def test_long_stream_telem(self):
        """
        Read test data and pull out data particles.
        Assert the expected number of particles is captured and there are no exceptions
        """

        stream_handle = open(os.path.join(RESOURCE_PATH, 'subset.csv'), 'rU')

        parser = FlortKnAuvParser(stream_handle,
                                  self.exception_callback,
                                  is_telemetered=True)
        particles = parser.get_records(10000)

        self.assertEqual(len(particles), 7697)

        self.assertEqual(self.exception_callback_value, [])

        stream_handle.close()
Exemple #3
0
    def test_simple_recov(self):
        """
        Read test data and pull out data particles.
        Assert that the results are those we expected.
        Expect the first input record to be skipped due to invalid timestamp
        """

        stream_handle = open(os.path.join(RESOURCE_PATH, 'subset_reduced.csv'), 'rU')

        parser = FlortKnAuvParser(stream_handle,
                                  self.exception_callback,
                                  is_telemetered=False)

        particles = parser.get_records(45)

        self.assert_particles(particles, 'flort_kn_auv_recov_45.yml', RESOURCE_PATH)

        self.assertEqual(self.exception_callback_value, [])

        stream_handle.close()