def _build_parser(self, stream_handle):

        parser = CtdavNAuvParser(stream_handle,
                                 self._exception_callback,
                                 is_telemetered=False)

        return parser
Example #2
0
    def test_long_stream(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 = CtdavNAuvParser(stream_handle, self.exception_callback)

        particles = parser.get_records(10000)

        self.assertEqual(len(particles), 8398)

        self.assertEqual(self.exception_callback_value, [])

        stream_handle.close()
    def test_long_stream(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 = CtdavNAuvParser(stream_handle,
                                 self.exception_callback)

        particles = parser.get_records(10000)

        self.assertEqual(len(particles), 8398)

        self.assertEqual(self.exception_callback_value, [])

        stream_handle.close()
Example #4
0
    def test_simple(self):
        """
        Read test data and pull out data particles.
        Assert that the results are those we expected.
        Expect the first two input records to be skipped due to invalid timestamp.
        """

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

        parser = CtdavNAuvParser(stream_handle, self.exception_callback)

        particles = parser.get_records(21)

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

        self.assertEqual(self.exception_callback_value, [])

        stream_handle.close()
    def test_simple(self):
        """
        Read test data and pull out data particles.
        Assert that the results are those we expected.
        Expect the first two input records to be skipped due to invalid timestamp.
        """

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

        parser = CtdavNAuvParser(stream_handle,
                                 self.exception_callback)

        particles = parser.get_records(21)

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

        self.assertEqual(self.exception_callback_value, [])

        stream_handle.close()
    def _build_parser(self, stream_handle):

        parser = CtdavNAuvParser(stream_handle, self._exception_callback)

        return parser