• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python test_parser.ParserUnitTestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中mi.dataset.test.test_parser.ParserUnitTestCase的典型用法代码示例。如果您正苦于以下问题:Python ParserUnitTestCase类的具体用法?Python ParserUnitTestCase怎么用?Python ParserUnitTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ParserUnitTestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)
        self.config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdmoParserDataParticle',
            'inductive_id': 55
            }

        # all indices give in the comments are in actual file position, not escape sequence replace indices
        # packets have the same timestamp, the first has 3 data samples [394-467]
        self.particle_a = CtdmoParserDataParticle(b'51EF36D6\x37\x39\x4c\xe0\xc3\x54\xe6\x0a\x81\xd5\x81\x19\x0d')
        # this is the start of packet 2 [855:1045]
        self.particle_b = CtdmoParserDataParticle(b'51EF52F677\xf0\x00\xc3T\xe5\n\xa1\xf1\x81\x19\r')
        # this is the start of packet 3 [1433:1623]
        self.particle_c = CtdmoParserDataParticle(b'51EF6F1676$p\xc3T\xe4\n\xc1\r\x82\x19\r')
        # this is the start of packet 4 [5354:5544]
        self.particle_d = CtdmoParserDataParticle(b'51EF8B36\x37\x35\x8b\xe0\xc3T\xe5\n\xe1)\x82\x19\r')
        # this is the start of packet 5 [6321:6511]
        self.particle_e = CtdmoParserDataParticle(b'51EFC37677\x17\xd6\x8eI;\x10!b\x82\x19\r')
        # start of packet 6 [6970-7160]
        self.particle_f = CtdmoParserDataParticle(b'51EFDF96\x37\x36\xe7\xe6\x89W9\x10A~\x82\x19\r')
        # packet 7 [7547-7737]
        self.particle_g = CtdmoParserDataParticle(b'51EFFBB6\x37\x32\t6F\x0c\xd5\x0fa\x9a\x82\x19\r')
        # in long file, starts at 13453
        self.particle_z = CtdmoParserDataParticle(b'51F0A47673\xb9\xa6]\x93\xf2\x0f!C\x83\x19\r')

        self.state_callback_value = None
        self.publish_callback_value = None
        self.exception_callback_value = None
开发者ID:manalang,项目名称:marine-integrations,代码行数:29,代码来源:test_ctdmo.py


示例2: setUp

    def setUp(self):

        ParserUnitTestCase.setUp(self)

        self._recovered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_imodem_particles',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                PhsenAbcdefImodemParticleClassKey.METADATA_PARTICLE_CLASS:
                PhsenAbcdefImodemMetadataRecoveredDataParticle,
                PhsenAbcdefImodemParticleClassKey.CONTROL_PARTICLE_CLASS:
                PhsenAbcdefImodemControlRecoveredDataParticle,
                PhsenAbcdefImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS:
                PhsenAbcdefImodemInstrumentRecoveredDataParticle,
            }
        }

        self._telemetered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_imodem_particles',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                PhsenAbcdefImodemParticleClassKey.METADATA_PARTICLE_CLASS:
                PhsenAbcdefImodemMetadataTelemeteredDataParticle,
                PhsenAbcdefImodemParticleClassKey.CONTROL_PARTICLE_CLASS:
                PhsenAbcdefImodemControlTelemeteredDataParticle,
                PhsenAbcdefImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS:
                PhsenAbcdefImodemInstrumentTelemeteredDataParticle,
            }
        }
开发者ID:GrimJ,项目名称:mi-dataset,代码行数:29,代码来源:test_phsen_abcdef_imodem.py


示例3: setUp

    def setUp(self):

        ParserUnitTestCase.setUp(self)

        self.config = {
            DataTypeKey.PHSEN_ABCDEF_DCL_RECOVERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_dcl',
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    'metadata_particle_class_key': PhsenAbcdefDclMetadataRecoveredDataParticle,
                    'data_particle_class_key': PhsenAbcdefDclInstrumentRecoveredDataParticle
                }
            },
            DataTypeKey.PHSEN_ABCDEF_DCL_TELEMETERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.phsen_abcdef_dcl',
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    'metadata_particle_class_key': PhsenAbcdefDclMetadataTelemeteredDataParticle,
                    'data_particle_class_key': PhsenAbcdefDclInstrumentTelemeteredDataParticle
                }
            },
        }

        self.rec_state_callback_value = None
        self.rec_file_ingested_value = False
        self.rec_publish_callback_value = None
        self.rec_exception_callback_value = None
        self.rec_exceptions_detected = 0
        self.tel_state_callback_value = None
        self.tel_file_ingested_value = False
        self.tel_publish_callback_value = None
        self.tel_exception_callback_value = None
        self.tel_exceptions_detected = 0
        self.maxDiff = None
开发者ID:JeffRoy,项目名称:mi-dataset,代码行数:34,代码来源:test_phsen_abcdef_dcl.py


示例4: setUp

    def setUp(self):
	ParserUnitTestCase.setUp(self)
	self.config = {
	    DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.issmcnsm_dostad',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'Issmcnsm_dostadParserDataParticle'
	    }

	self.start_state = {StateKey.POSITION:0, StateKey.TIMESTAMP:0.0}
        # Define test data particles and their associated timestamps which will be 
        # compared with returned results
	self.timestamp1 = 3590524817.862
        self.particle_a = Issmcnsm_dostadParserDataParticle(
	    "2013/10/12 00:00:17.862 4831\t135\t323.144\t101.137\t14.337\t31.580\t31.580\t40.363\t8.783\t1079.2\t1070.5\t245.4\r",
            internal_timestamp=self.timestamp1)
	self.timestamp2 = 3590524819.861
	self.particle_b = Issmcnsm_dostadParserDataParticle(
	    "2013/10/12 00:00:19.861 4831\t135\t323.140\t101.135\t14.337\t31.581\t31.581\t40.362\t8.781\t1079.1\t1068.5\t245.4\r",
            internal_timestamp=self.timestamp2)
    	self.timestamp3 = 3590524821.862
	self.particle_c = Issmcnsm_dostadParserDataParticle(
	    "2013/10/12 00:00:21.862 4831\t135\t323.141\t101.136\t14.337\t31.581\t31.581\t40.362\t8.781\t1078.9\t1067.3\t245.4\r",
            internal_timestamp=self.timestamp3)
	self.timestamp4 = 3590524823.862
	self.particle_d = Issmcnsm_dostadParserDataParticle(
	    "2013/10/12 00:00:23.862 4831\t135\t323.126\t101.131\t14.337\t31.581\t31.581\t40.363\t8.782\t1078.8\t1066.3\t245.4\r",
            internal_timestamp=self.timestamp4)
	self.timestamp_last = 3590524851.861
	self.particle_z = Issmcnsm_dostadParserDataParticle(
	    "2013/10/12 00:00:51.861 4831\t135\t322.889\t101.087\t14.351\t31.583\t31.583\t40.380\t8.796\t1077.4\t1057.4\t244.9\r",
            internal_timestamp=self.timestamp_last)

        self.state_callback_value = None
        self.publish_callback_value = None
开发者ID:NickAlmonte,项目名称:mi-dataset,代码行数:33,代码来源:test_issmcnsm_dostad.py


示例5: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)
        self.config = {
            DataTypeKey.SPKIR_ABJ_CSPP_TELEMETERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.spkir_abj_cspp',
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    METADATA_PARTICLE_CLASS_KEY: SpkirAbjCsppMetadataTelemeteredDataParticle,
                    DATA_PARTICLE_CLASS_KEY: SpkirAbjCsppInstrumentTelemeteredDataParticle,
                }
            },
            DataTypeKey.SPKIR_ABJ_CSPP_RECOVERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.spkir_abj_cspp',
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    METADATA_PARTICLE_CLASS_KEY: SpkirAbjCsppMetadataRecoveredDataParticle,
                    DATA_PARTICLE_CLASS_KEY: SpkirAbjCsppInstrumentRecoveredDataParticle,
                }
            },
        }

        # Define test data particles and their associated timestamps which will be
        # compared with returned results

        self.file_ingested_value = None
        self.state_callback_value = None
        self.publish_callback_value = None
        self.exception_callback_value = None
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:28,代码来源:test_spkir_abj_cspp.py


示例6: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)
        self.config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: "mi.dataset.parser.ctdpf",
            DataSetDriverConfigKeys.PARTICLE_CLASS: "CtdpfParserDataParticle",
        }

        # not a DataSourceLocation...its just the parser
        self.position = {StateKey.POSITION: 0, StateKey.TIMESTAMP: 0.0}

        # Gonna need the test cases to make some of these
        # self.stream_handle = StringIO(TEST_DATA)
        # self.parser = CtdpfParser(config, self.position, self.stream_handle) # last one is the link to the data source
        self.base_timestamp = 3526427761.0
        self.particle_a = CtdpfParserDataParticle(
            " 42.2095, 13.4344,  143.63,   2830.2", internal_timestamp=self.base_timestamp
        )
        self.particle_b = CtdpfParserDataParticle(
            " 42.2102, 13.4346,  143.63,   2831.1", internal_timestamp=self.base_timestamp + 1
        )
        self.particle_c = CtdpfParserDataParticle(
            " 42.2105, 13.4352,  143.63,   2830.6", internal_timestamp=self.base_timestamp + 2
        )
        self.particle_d = CtdpfParserDataParticle(
            " 42.2110, 13.4350,  143.62,   2831.5", internal_timestamp=self.base_timestamp + 3
        )
        self.particle_e = CtdpfParserDataParticle(
            " 42.2102, 13.4346,  143.63,   2831.1", internal_timestamp=self.base_timestamp + 60
        )
        self.particle_z = CtdpfParserDataParticle(
            " 11.1111, 22.2222,  333.33,   4444.4", internal_timestamp=self.base_timestamp + 43
        )

        self.position_callback_value = None
        self.publish_callback_value = None
开发者ID:cwingard,项目名称:marine-integrations,代码行数:35,代码来源:test_ctdpf.py


示例7: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)
        self.config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpfk',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdpfkParserDataParticle'
            }

        # not a DataSourceLocation...its just the parser
        self.position = {StateKey.POSITION:0, StateKey.TIMESTAMP:0.0}

        # Gonna need the test cases to make some of these
        # self.stream_handle = StringIO(TEST_DATA)        
        # self.parser = CtdpfParser(config, self.position, self.stream_handle) # last one is the link to the data source
        self.base_timestamp = 3575062802.0
        self.particle_a = CtdpfkParserDataParticle("1.5370,16.3184,12.630, 3122",
                                                  internal_timestamp=self.base_timestamp)
        self.particle_b = CtdpfkParserDataParticle("1.5370,16.3174,12.640, 3127",
                                                  internal_timestamp=self.base_timestamp+1)
        self.particle_c = CtdpfkParserDataParticle("1.5371,16.3170,12.640, 3132",
                                                  internal_timestamp=self.base_timestamp+2)
        self.particle_d = CtdpfkParserDataParticle("1.5371,16.3171,12.640, 3137",
                                                  internal_timestamp=self.base_timestamp+3)
        self.particle_e = CtdpfkParserDataParticle("1.5371,16.3169,12.640, 3141",
                                                  internal_timestamp=self.base_timestamp+60)
        self.particle_z = CtdpfkParserDataParticle("1.5371,16.3160,12.640, 3146",
                                                  internal_timestamp=self.base_timestamp+43)

        self.position_callback_value = None
        self.publish_callback_value = None
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:29,代码来源:test_ctdpfk.py


示例8: setUp

    def setUp(self):
	ParserUnitTestCase.setUp(self)
	self.config = {
	    DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.issmcnsm_flortd',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'Issmcnsm_flortdParserDataParticle'
	    }
	self.start_state = {StateKey.POSITION:0, StateKey.TIMESTAMP:0.0}
        # Define test data particles and their associated timestamps which will be 
        # compared with returned results
	self.timestamp1 = 3592854645.0039997
        self.particle_a = Issmcnsm_flortdParserDataParticle(
	    "2013/11/07 23:10:45.004 03/06/13\t23:08:51\t700\t4130\t695\t928\t460\t4130\t540\r",
            internal_timestamp=self.timestamp1)
	self.timestamp2 = 3592854646.136
        self.particle_b = Issmcnsm_flortdParserDataParticle(
	    "2013/11/07 23:10:46.136 03/06/13\t23:08:52\t700\t4130\t695\t929\t460\t4130\t540\r",
            internal_timestamp=self.timestamp2)
	self.timestamp3 = 3592854647.269
        self.particle_c = Issmcnsm_flortdParserDataParticle(
	    "2013/11/07 23:10:47.269 03/06/13\t23:08:53\t700\t4130\t695\t926\t460\t4130\t539\r",
            internal_timestamp=self.timestamp3)
	self.timestamp4 = 3592854648.401
        self.particle_d = Issmcnsm_flortdParserDataParticle(
	    "2013/11/07 23:10:48.401 03/06/13\t23:08:55\t700\t4130\t695\t927\t460\t4130\t539\r",
            internal_timestamp=self.timestamp4)

	self.timestamp_long = 3592854660.857
        self.particle_z = Issmcnsm_flortdParserDataParticle(
	    "2013/11/07 23:11:00.857 03/06/13\t23:09:07\t700\t4130\t695\t927\t460\t4130\t538\r",
            internal_timestamp=self.timestamp_long)

        self.state_callback_value = None
        self.publish_callback_value = None
开发者ID:cwingard,项目名称:marine-integrations,代码行数:33,代码来源:test_issmcnsm_flortd.py


示例9: setUp

    def setUp(self):
	ParserUnitTestCase.setUp(self)
	self.config = {
	    DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdmo',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'CtdmoParserDataParticle',
	    'inductive_id': 55
	    }

	# packets have the same timestamp, the first has 3 data samples [394-467]
	self.timestamp1 = 3583612801.0
	self.particle_a = CtdmoParserDataParticle(b'\x37\x39\x4c\xe0\xc3\x54\xe6\x0a\x81\xd5\x81\x19\x0d',
						  internal_timestamp=self.timestamp1)
	# this is the start of packet 2 [5354:5544]
	self.timestamp2 = 3583634401.0
	self.particle_b = CtdmoParserDataParticle(b'\x37\x35\x8b\xe0\xc3T\xe5\n\xe1)\x82\x19\r',
						  internal_timestamp=self.timestamp2)
	# start of packet 3 [6970-7160]
	self.timestamp3 = 3583656001.0
	self.particle_c = CtdmoParserDataParticle(b'\x37\x36\xe7\xe6\x89W9\x10A~\x82\x19\r',
						   internal_timestamp=self.timestamp3)
	# packet 4 [7547-7737]
	self.timestamp4 = 3583663201.0
	self.particle_d = CtdmoParserDataParticle(b'\x37\x32\t6F\x0c\xd5\x0fa\x9a\x82\x19\r',
						   internal_timestamp=self.timestamp4)

	self.timestamp_last = 3583692001.0
	self.particle_z = CtdmoParserDataParticle(b'73\xcd\x86_\x92\x13\x10\xe1\n\x83\x19\r',
						   internal_timestamp=self.timestamp_last)

	self.state_callback_value = None
        self.publish_callback_value = None
开发者ID:cwingard,项目名称:marine-integrations,代码行数:31,代码来源:test_ctdmo.py


示例10: setUp

    def setUp(self):

        ParserUnitTestCase.setUp(self)

        self._recovered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                FuelCellEngDclParticleClassKey.ENGINEERING_DATA_PARTICLE_CLASS: FuelCellEngDclDataParticleRecovered
            }
        }

        self._telemetered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                FuelCellEngDclParticleClassKey.ENGINEERING_DATA_PARTICLE_CLASS: FuelCellEngDclDataParticleTelemetered
            }
        }

        self._incomplete_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None
        }

        self._bad_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.fuelcell_eng_dcl',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {}
        }
开发者ID:danmergens,项目名称:mi-instrument,代码行数:30,代码来源:test_fuelcell_eng_dcl.py


示例11: setUp

    def setUp(self):

        ParserUnitTestCase.setUp(self)

        self._recovered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.pco2w_abc_particles',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                Pco2wAbcParticleClassKey.METADATA_PARTICLE_CLASS: Pco2wAbcDclMetadataRecoveredDataParticle,
                Pco2wAbcParticleClassKey.POWER_PARTICLE_CLASS: Pco2wAbcDclPowerRecoveredDataParticle,
                Pco2wAbcParticleClassKey.INSTRUMENT_PARTICLE_CLASS: Pco2wAbcDclInstrumentRecoveredDataParticle,
                Pco2wAbcParticleClassKey.INSTRUMENT_BLANK_PARTICLE_CLASS:
                Pco2wAbcDclInstrumentBlankRecoveredDataParticle,
            }
        }

        self._telemetered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.pco2w_abc_particles',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                Pco2wAbcParticleClassKey.METADATA_PARTICLE_CLASS: Pco2wAbcDclMetadataTelemeteredDataParticle,
                Pco2wAbcParticleClassKey.POWER_PARTICLE_CLASS: Pco2wAbcDclPowerTelemeteredDataParticle,
                Pco2wAbcParticleClassKey.INSTRUMENT_PARTICLE_CLASS: Pco2wAbcDclInstrumentTelemeteredDataParticle,
                Pco2wAbcParticleClassKey.INSTRUMENT_BLANK_PARTICLE_CLASS:
                Pco2wAbcDclInstrumentBlankTelemeteredDataParticle,
            }
        }
开发者ID:NickAlmonte,项目名称:mi-dataset,代码行数:27,代码来源:test_pco2w_abc_dcl.py


示例12: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)
        self.config = {
            DbgPdbgDataTypeKey.DBG_PDBG_CSPP_TELEMETERED: {
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    METADATA_PARTICLE_CLASS_KEY: DbgPdbgMetadataTelemeteredDataParticle,
                    BATTERY_STATUS_CLASS_KEY: DbgPdbgTelemeteredBatteryParticle,
                    GPS_ADJUSTMENT_CLASS_KEY: DbgPdbgTelemeteredGpsParticle
                }
            },
            DbgPdbgDataTypeKey.DBG_PDBG_CSPP_RECOVERED: {
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    METADATA_PARTICLE_CLASS_KEY: DbgPdbgMetadataRecoveredDataParticle,
                    BATTERY_STATUS_CLASS_KEY: DbgPdbgRecoveredBatteryParticle,
                    GPS_ADJUSTMENT_CLASS_KEY: DbgPdbgRecoveredGpsParticle
                }
            },
        }

        # Define test data particles and their associated timestamps which will be
        # compared with returned results

        self.file_ingested_value = None
        self.state_callback_value = None
        self.publish_callback_value = None
        self.exception_callback_value = None
开发者ID:NickAlmonte,项目名称:marine-integrations,代码行数:28,代码来源:test_dbg_pdbg_cspp.py


示例13: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)

        self._telemetered_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE:
                'mi.dataset.parser.ctdmo_ghqr_imodem',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                CtdmoGhqrImodemParticleClassKey.METADATA_PARTICLE_CLASS:
                    CtdmoGhqrImodemMetadataTelemeteredDataParticle,
                CtdmoGhqrImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS:
                    CtdmoGhqrImodemInstrumentTelemeteredDataParticle,
            }
        }

        self._recovered_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE:
                'mi.dataset.parser.ctdmo_ghqr_imodem',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                CtdmoGhqrImodemParticleClassKey.METADATA_PARTICLE_CLASS:
                    CtdmoGhqrImodemMetadataRecoveredDataParticle,
                CtdmoGhqrImodemParticleClassKey.INSTRUMENT_PARTICLE_CLASS:
                    CtdmoGhqrImodemInstrumentRecoveredDataParticle,
            }
        }
开发者ID:GrimJ,项目名称:mi-dataset,代码行数:26,代码来源:test_ctdmo_ghqr_imodem.py


示例14: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)

        self._exception_occurred = False
        
        self.config = {
            DataTypeKey.PRESF_ABC_DCL_TELEMETERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME,
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    TIDE_PARTICLE_CLASS_KEY: PresfAbcDclTelemeteredTideDataParticle,
                    WAVE_PARTICLE_CLASS_KEY: PresfAbcDclTelemeteredWaveDataParticle,
                }
            },
            DataTypeKey.PRESF_ABC_DCL_RECOVERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME,
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                    TIDE_PARTICLE_CLASS_KEY: PresfAbcDclRecoveredTideDataParticle,
                    WAVE_PARTICLE_CLASS_KEY: PresfAbcDclRecoveredWaveDataParticle,
                }
            },
        }

        self.file_ingested_value = None
        self.state_callback_value = None
        self.publish_callback_value = None

        self.maxDiff = None
开发者ID:NickAlmonte,项目名称:mi-dataset,代码行数:29,代码来源:test_presf_abc_dcl.py


示例15: setUp

    def setUp(self):

        ParserUnitTestCase.setUp(self)

        self._parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_ab_particles',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                VelptAbParticleClassKey.METADATA_PARTICLE_CLASS: VelptAbDiagnosticsHeaderParticle,
                VelptAbParticleClassKey.DIAGNOSTICS_PARTICLE_CLASS: VelptAbDiagnosticsDataParticle,
                VelptAbParticleClassKey.INSTRUMENT_METADATA_PARTICLE_CLASS: VelptAbInstrumentMetadataParticle,
                VelptAbParticleClassKey.INSTRUMENT_PARTICLE_CLASS: VelptAbInstrumentDataParticle
            }
        }

        self._incomplete_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_ab_dcl_particles',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None
        }

        self._bad_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.velpt_ab_particles',
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {}
        }
开发者ID:danmergens,项目名称:mi-instrument,代码行数:25,代码来源:test_velpt_ab.py


示例16: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)

        self._telemetered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: "mi.dataset.parser.parad_j_cspp",
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                METADATA_PARTICLE_CLASS_KEY: ParadJCsppMetadataTelemeteredDataParticle,
                DATA_PARTICLE_CLASS_KEY: ParadJCsppInstrumentTelemeteredDataParticle,
            },
        }

        self._recovered_parser_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: "mi.dataset.parser.parad_j_cspp",
            DataSetDriverConfigKeys.PARTICLE_CLASS: None,
            DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
                METADATA_PARTICLE_CLASS_KEY: ParadJCsppMetadataRecoveredDataParticle,
                DATA_PARTICLE_CLASS_KEY: ParadJCsppInstrumentRecoveredDataParticle,
            },
        }

        # Define test data particles and their associated timestamps which will be
        # compared with returned results

        self.file_ingested_value = None
开发者ID:jamundson,项目名称:mi-dataset,代码行数:25,代码来源:test_parad_j_cspp.py


示例17: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)
        self.telem_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.flort_dj_sio',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'FlortdParserDataParticle'
        }

        self.recov_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.flort_dj_sio',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'FlortdRecoveredParserDataParticle'
        }

        # particles from FLO15908.DAT and FLO_short.DAT
        self.particle_a_recov = FlortdRecoveredParserDataParticle(
            '51EC760117/12/13\t00:00:05\t700\t4130\t695\t700\t460\t4130\t547')
        self.particle_b_recov = FlortdRecoveredParserDataParticle(
            '51EC798517/12/13\t00:15:04\t700\t4130\t695\t708\t460\t4130\t548')
        self.particle_c_recov = FlortdRecoveredParserDataParticle(
            '51EC7D0917/12/13\t00:30:04\t700\t4130\t695\t702\t460\t4130\t548')
        self.particle_d_recov = FlortdRecoveredParserDataParticle(
            '51EC808D17/12/13\t00:45:04\t700\t4130\t695\t710\t460\t4130\t548')
        self.particle_e_recov = FlortdRecoveredParserDataParticle(
            '51EC841117/12/13\t01:00:04\t700\t4130\t695\t708\t460\t4130\t548')
        self.particle_f_recov = FlortdRecoveredParserDataParticle(
            '51EC879517/12/13\t01:15:04\t700\t4130\t695\t700\t460\t4130\t548')

        # particles from FLO15908.DAT
        self.particle_long_before_last = FlortdRecoveredParserDataParticle(
            '51EDC07917/12/13\t23:30:05\t700\t4130\t695\t677\t460\t4130\t545')
        self.particle_long_last = FlortdRecoveredParserDataParticle(
            '51EDC3FD17/12/13\t23:45:05\t700\t4130\t695\t674\t460\t4130\t545')

        self.stream_handle = None
开发者ID:danmergens,项目名称:mi-instrument,代码行数:33,代码来源:test_flort_dj_sio.py


示例18: setUp

    def setUp(self):
        ParserUnitTestCase.setUp(self)
        self.config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.dosta_ln_wfp_sio',
            DataSetDriverConfigKeys.PARTICLE_CLASS: 'DostaLnWfpSioDataParticle'
        }

        # the hex characters used to create the expected particles below were extracted
        # from the first 4 E records in the file node58p1_0.we_wfp.dat by hand
        # and used here to verify the correct raw data was used to create the particles
        self.timestamp_1a = self.timestamp_to_ntp(b'\x52\x04\xCC\x2D')
        self.particle_1a = DostaLnWfpSioDataParticle(
            b'\x52\x04\xCC\x2D\x00\x00\x00\x00\x41\x3B\x6F\xD2\x00\x00\x00'
            b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x60\x02\x3E',
            internal_timestamp=self.timestamp_1a)

        self.timestamp_1b = self.timestamp_to_ntp(b'\x52\x04\xCD\x70')
        self.particle_1b = DostaLnWfpSioDataParticle(
            b'\x52\x04\xCD\x70\x43\x66\x2F\x90\x41\x32\xDE\x01\x45\x7D\xA7'
            b'\x85\x43\x13\x9F\x7D\x3F\xBF\xBE\x77\x00\x37\x00\x61\x02\x3C',
            internal_timestamp=self.timestamp_1b)

        self.timestamp_1c = self.timestamp_to_ntp(b'\x52\x04\xCE\xB0')
        self.particle_1c = DostaLnWfpSioDataParticle(
            b'\x52\x04\xCE\xB0\x43\x6D\xEA\x30\x41\x2F\xE5\xC9\x45\x78\x56'
            b'\x66\x43\x12\x94\x39\x3F\xBF\x9D\xB2\x00\x37\x00\x73\x02\x3B',
            internal_timestamp=self.timestamp_1c)

        self.timestamp_1d = self.timestamp_to_ntp(b'\x52\x04\xCF\xF0')

        self.particle_1d = DostaLnWfpSioDataParticle(
            b'\x52\x04\xCF\xF0\x43\x6E\x7C\x78\x41\x2E\xF4\xF1\x45\x73\x1B'
            b'\x0A\x43\x11\x9F\x7D\x3F\xBF\x7C\xEE\x00\x37\x00\x5E\x02\x3B',
            internal_timestamp=self.timestamp_1d)
开发者ID:petercable,项目名称:mi-dataset,代码行数:34,代码来源:test_dosta_ln_wfp_sio.py


示例19: setUp

    def setUp(self):

        ParserUnitTestCase.setUp(self)

        self.config = {
            DataTypeKey.CTDPF_CKL_WFP_RECOVERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf_ckl_wfp',
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                'particle_classes_dict': {
                    'instrument_data_particle_class': CtdpfCklWfpRecoveredDataParticle,
                    'metadata_particle_class': CtdpfCklWfpRecoveredMetadataParticle
                },
            },
            DataTypeKey.CTDPF_CKL_WFP_TELEMETERED: {
                DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.ctdpf_ckl_wfp',
                DataSetDriverConfigKeys.PARTICLE_CLASS: None,
                'particle_classes_dict': {
                    'instrument_data_particle_class': CtdpfCklWfpTelemeteredDataParticle,
                    'metadata_particle_class': CtdpfCklWfpTelemeteredMetadataParticle
                }
            }
        }

        self.file_ingested_value = None
        self.state_callback_value = None
        self.publish_callback_value = None
开发者ID:StevenMyerson,项目名称:mi-dataset,代码行数:26,代码来源:test_ctdpf_ckl_wfp_yml_build.py


示例20: setUp

 def setUp(self):
     ParserUnitTestCase.setUp(self)
     self.config = \
         {
             DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.adcps_jln_sio',
             DataSetDriverConfigKeys.PARTICLE_CLASS: 'AdcpsJlnSioDataParticle'
         }
开发者ID:GrimJ,项目名称:mi-dataset,代码行数:7,代码来源:test_adcps_jln_sio.py



注:本文中的mi.dataset.test.test_parser.ParserUnitTestCase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python comm_config.CommConfig类代码示例发布时间:2022-05-27
下一篇:
Python wfp_eng__stc_imodem.WfpEngStcImodemParser类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap