当前位置: 首页>>代码示例>>Python>>正文


Python unit_test.DataSetTestCase类代码示例

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


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

示例1:

from pyon.agent.agent import ResourceAgentState
from interface.objects import CapabilityType
from interface.objects import AgentCapability
from interface.objects import ResourceAgentErrorEvent
from interface.objects import ResourceAgentConnectionLostErrorEvent


DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.issm.nutnrb.driver',
    driver_class='IssmRiNUTNRBDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = IssmRiNUTNRBDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.STORAGE_DIRECTORY: '/tmp/stored_dsatest',
            DataSetDriverConfigKeys.PATTERN: '*.log',
            DataSetDriverConfigKeys.FREQUENCY: 1,
        },
        DataSourceConfigKey.PARSER: {}
    }
)

SAMPLE_STREAM = 'nutnrb_parsed'

###############################################################################
#                                INT TESTS                                    #
# Device specific integration tests are for                                   #
# testing device specific capabilities                                        #
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py

示例2:

from mi.dataset.driver.mflm.phsen.driver import MflmPHSENDataSetDriver
from mi.dataset.parser.phsen import PhsenParserDataParticle

from pyon.agent.agent import ResourceAgentState
from interface.objects import ResourceAgentErrorEvent
from interface.objects import ResourceAgentConnectionLostErrorEvent

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.mflm.phsen.driver',
    driver_class='MflmPHSENDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = MflmPHSENDataSetDriver.stream_config(),
    startup_config = {
        'harvester':
        {
            'directory': '/tmp/dsatest',
            'pattern': 'node59p1.dat',
            'frequency': 1,
        },
        'parser': {}
    }
)

SAMPLE_STREAM = 'phsen_parsed'

###############################################################################
#                            INTEGRATION TESTS                                #
# Device specific integration tests are for                                   #
# testing device specific capabilities                                        #
###############################################################################
开发者ID:cwingard,项目名称:marine-integrations,代码行数:32,代码来源:test_driver.py

示例3:

TELEM_FILE_TWO = "E00000002.DAT"

# Fill in driver details
DataSetTestCase.initialize(
    driver_module="mi.dataset.driver.WFP_ENG.STC_IMODEM.driver",
    driver_class="WFP_ENG__STC_IMODEM_DataSetDriver",
    agent_resource_id="123xyz",
    agent_name="Agent007",
    agent_packet_config=WFP_ENG__STC_IMODEM_DataSetDriver.stream_config(),
    startup_config={
        DataSourceConfigKey.RESOURCE_ID: "wfp_eng__stc_imodem",
        DataSourceConfigKey.HARVESTER: {
            DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED: {
                DataSetDriverConfigKeys.DIRECTORY: RECOV_DIR,
                DataSetDriverConfigKeys.PATTERN: "E*.DAT",
                DataSetDriverConfigKeys.FREQUENCY: 1,
            },
            DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED: {
                DataSetDriverConfigKeys.DIRECTORY: TELEM_DIR,
                DataSetDriverConfigKeys.PATTERN: "E*.DAT",
                DataSetDriverConfigKeys.FREQUENCY: 1,
            },
        },
        DataSourceConfigKey.PARSER: {
            DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED: {},
            DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED: {},
        },
    },
)

RECOV_PARTICLES = (
    WfpEngStcImodemStatusRecoveredDataParticle,
开发者ID:ooici,项目名称:marine-integrations,代码行数:32,代码来源:test_driver.py

示例4:

from mi.core.instrument.instrument_driver import DriverEvent

from mi.dataset.dataset_driver import DataSourceConfigKey, DataSetDriverConfigKeys
from mi.dataset.driver.flord_l_wfp.sio_mule.driver import FlordLWfpSioMuleDataSetDriver
from mi.dataset.parser.flord_l_wfp_sio_mule import FlordLWfpSioMuleParserDataParticle, DataParticleType

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.flord_l_wfp.sio_mule.driver',
    driver_class='FlordLWfpSioMuleDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = FlordLWfpSioMuleDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.RESOURCE_ID: 'flord_l_wfp_sio_mule',
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.PATTERN: 'TestData.dat',  
            DataSetDriverConfigKeys.FREQUENCY: 1,
        },
        DataSourceConfigKey.PARSER: {}
    }
)

SAMPLE_STREAM = 'flord_l_wfp_instrument'

# The integration and qualification tests generated here are suggested tests,
# but may not be enough to fully test your driver. Additional tests should be
# written as needed.
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:30,代码来源:test_driver.py

示例5:

from mi.dataset.dataset_driver import DriverParameter
from pyon.agent.agent import ResourceAgentState
from interface.objects import ResourceAgentErrorEvent

from mi.dataset.driver.issmcnsm.dosta.driver import IssmCnsmDOSTADDataSetDriver
from mi.dataset.parser.issmcnsm_dostad import Issmcnsm_dostadParserDataParticle

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.issmcnsm.dosta.driver',
    driver_class='IssmCnsmDOSTADDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = IssmCnsmDOSTADDataSetDriver.stream_config(),
    startup_config = {
        'harvester':
        {
            'directory': '/tmp/dsatest',
            'pattern': '*.dosta.log',
            'frequency': 1,
        },
        'parser': {}
    }
)

SAMPLE_STREAM = 'issmcnsm_dostad_parsed'

###############################################################################
#                            INTEGRATION TESTS                                #
# Device specific integration tests are for                                   #
# testing device specific capabilities                                        #
###############################################################################
开发者ID:cwingard,项目名称:marine-integrations,代码行数:32,代码来源:test_driver.py

示例6:

from mi.dataset.driver.issmcnsm.dosta.driver import IssmCnsmDOSTADDataSetDriver
from mi.dataset.parser.issmcnsm_dostad import Issmcnsm_dostadParserDataParticle

RESOURCE_ID = 'dostad'

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.issmcnsm.dosta.driver',
    driver_class='IssmCnsmDOSTADDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = IssmCnsmDOSTADDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.RESOURCE_ID: RESOURCE_ID,
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.STORAGE_DIRECTORY: '/tmp/stored_dsatest',
            DataSetDriverConfigKeys.PATTERN: '*.dosta.log',
            DataSetDriverConfigKeys.FREQUENCY: 1,
            DataSetDriverConfigKeys.FILE_MOD_WAIT_TIME: 30,
        },
        DataSourceConfigKey.PARSER: {}
    }
)

SAMPLE_STREAM = 'issmcnsm_dostad_parsed'

###############################################################################
#                            INTEGRATION TESTS                                #
# Device specific integration tests are for                                   #
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py

示例7:

from pyon.agent.agent import ResourceAgentState

from interface.objects import CapabilityType
from interface.objects import AgentCapability
from interface.objects import ResourceAgentErrorEvent
from interface.objects import ResourceAgentConnectionLostErrorEvent

DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.wfp.paradk.driver',
    driver_class="WfpPARADKDataSetDriver",

    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = WfpPARADKDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.STORAGE_DIRECTORY: '/tmp/stored_dsatest',
            DataSetDriverConfigKeys.PATTERN: '*.TXT',
            DataSetDriverConfigKeys.FREQUENCY: 1,
        },
        DataSourceConfigKey.PARSER: {}
    }
)

SAMPLE_STREAM='wfp_parad_k_parsed'

###############################################################################
#                                INT TESTS                                   #
# Device specific integration tests are for                                          #
# testing device specific capabilities                                        #
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:32,代码来源:test_driver.py

示例8:

from mi.dataset.parser.wfp_eng__stc_imodem import DataParticleType, Wfp_eng__stc_imodem_statusParserDataParticle
from mi.dataset.parser.wfp_eng__stc_imodem import Wfp_eng__stc_imodem_startParserDataParticle
from mi.dataset.parser.wfp_eng__stc_imodem import Wfp_eng__stc_imodem_engineeringParserDataParticle
from pyon.agent.agent import ResourceAgentState
from interface.objects import ResourceAgentErrorEvent

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.WFP_ENG.STC_IMODEM.driver',
    driver_class='WFP_ENG__STC_IMODEM_DataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = WFP_ENG__STC_IMODEM_DataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.RESOURCE_ID: 'wfp_eng__stc_imodem',
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.PATTERN: 'E*.DAT',
            DataSetDriverConfigKeys.FREQUENCY: 1,
        },
        DataSourceConfigKey.PARSER: {}
    }
)

###############################################################################
#                            INTEGRATION TESTS                                #
# Device specific integration tests are for                                   #
# testing device specific capabilities                                        #
###############################################################################
@attr('INT', group='mi')
开发者ID:StevenMyerson,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py

示例9:

from interface.objects import ResourceAgentErrorEvent

from mi.dataset.driver.RTE.STC.driver import RteOStcDataSetDriver
from mi.dataset.parser.rte_o_stc import RteOStcParserDataParticle


# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.RTE.STC.driver',
    driver_class='RteOStcDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = RteOStcDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.RESOURCE_ID: 'rte_o_stc',
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.PATTERN: '*.rte.log',
            DataSetDriverConfigKeys.FREQUENCY: 1,
        },
        DataSourceConfigKey.PARSER: {}
    }
)

SAMPLE_STREAM = 'rte_xx__stc_instrument'

###############################################################################
#                            INTEGRATION TESTS                                #
# Device specific integration tests are for                                   #
# testing device specific capabilities                                        #
开发者ID:j2project,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py

示例10:

from mi.dataset.dataset_driver import DriverParameter
from mi.dataset.dataset_driver import DataSourceConfigKey, DataSetDriverConfigKeys
from mi.dataset.driver.ctdpf_ckl.wfp.driver import CtdpfCklWfpDataSetDriver
from mi.dataset.parser.ctdpf_ckl_wfp import CtdpfCklWfpParserDataParticle, DataParticleType
from mi.dataset.parser.wfp_c_file_common import StateKey

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.ctdpf_ckl.wfp.driver',
    driver_class='CtdpfCklWfpDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = CtdpfCklWfpDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.RESOURCE_ID: 'ctdpf_ckl_wfp',
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.PATTERN: 'C*.DAT',
            DataSetDriverConfigKeys.FREQUENCY: 1,
        },
        DataSourceConfigKey.PARSER: {}
    }
)


# The integration and qualification tests generated here are suggested tests,
# but may not be enough to fully test your driver. Additional tests should be
# written as needed.

###############################################################################
开发者ID:StevenMyerson,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py

示例11:

from mi.dataset.parser.ctdmo import CtdmoParserDataParticle, DataParticleType
from mi.dataset.parser.ctdmo import CtdmoOffsetDataParticle

TELEM_DIR = '/tmp/dsatest'

DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.mflm.ctd.driver',
    driver_class="MflmCTDMODataSetDriver",
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = MflmCTDMODataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.HARVESTER:
        {
            DataSourceKey.CTDMO_GHQR_SIO_MULE:
            {
                DataSetDriverConfigKeys.DIRECTORY: TELEM_DIR,
                DataSetDriverConfigKeys.PATTERN: 'node59p1.dat',
                DataSetDriverConfigKeys.FREQUENCY: 1,
                DataSetDriverConfigKeys.FILE_MOD_WAIT_TIME: 30,
            }
        },
        DataSourceConfigKey.PARSER: {
            DataSourceKey.CTDMO_GHQR_SIO_MULE: {'inductive_id': 55}
        }
    }
)


###############################################################################
#                            INTEGRATION TESTS                                #
# Device specific integration tests are for                                   #
开发者ID:StevenMyerson,项目名称:marine-integrations,代码行数:32,代码来源:test_driver.py

示例12:

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.PARAD_K.STC_IMODEM.driver',
    driver_class='PARAD_K_STC_IMODEM_DataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = PARAD_K_STC_IMODEM_DataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.RESOURCE_ID: 'parad_k_stc_imodem',
        DataSourceConfigKey.HARVESTER:
        {
            DataTypeKey.PARAD_K_STC:
            {
                DataSetDriverConfigKeys.DIRECTORY: DIR_TEL,
                DataSetDriverConfigKeys.PATTERN: 'E*.DAT',
                DataSetDriverConfigKeys.FREQUENCY: 1,
            },
            DataTypeKey.PARAD_K_STC_RECOVERED:
            {
                DataSetDriverConfigKeys.DIRECTORY: DIR_REC,
                DataSetDriverConfigKeys.PATTERN: 'E*.DAT',
                DataSetDriverConfigKeys.FREQUENCY: 1,
            }
        },
        DataSourceConfigKey.PARSER:
        {
            DataTypeKey.PARAD_K_STC: {},
            DataTypeKey.PARAD_K_STC_RECOVERED: {}
        }
    }
)
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py

示例13:

# Driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.ctdpf_j.cspp.driver',
    driver_class='CtdpfJCsppDataSetDriver',
    agent_resource_id='123xyz',
    agent_name='Agent007',
    agent_packet_config=CtdpfJCsppDataSetDriver.stream_config(),
    startup_config={
        DataSourceConfigKey.RESOURCE_ID: 'ctdpf_j_cspp',
        DataSourceConfigKey.HARVESTER:
        {
            DataTypeKey.CTDPF_J_CSPP_TELEMETERED: {
                DataSetDriverConfigKeys.DIRECTORY: DIR_CTDPF_TELEMETERED,
                DataSetDriverConfigKeys.PATTERN: CTDPF_TEL_PATTERN,
                DataSetDriverConfigKeys.FREQUENCY: 1,
            },
            DataTypeKey.CTDPF_J_CSPP_RECOVERED: {
                DataSetDriverConfigKeys.DIRECTORY: DIR_CTDPF_RECOVERED,
                DataSetDriverConfigKeys.PATTERN: CTDPF_REC_PATTERN,
                DataSetDriverConfigKeys.FREQUENCY: 1,
            }
        },
        DataSourceConfigKey.PARSER: {
            DataTypeKey.CTDPF_J_CSPP_TELEMETERED: {},
            DataTypeKey.CTDPF_J_CSPP_RECOVERED: {}
        }
    }
)

REC_PARTICLES = (CtdpfJCsppMetadataRecoveredDataParticle,
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:30,代码来源:test_driver.py

示例14:

from mi.dataset.parser.dostad import DostadParserDataParticle

from pyon.agent.agent import ResourceAgentState
from interface.objects import ResourceAgentErrorEvent
from interface.objects import ResourceAgentConnectionLostErrorEvent


DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.mflm.dosta.driver',
    driver_class='MflmDOSTADDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = MflmDOSTADDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.HARVESTER:
        {
            DataSetDriverConfigKeys.DIRECTORY: '/tmp/dsatest',
            DataSetDriverConfigKeys.STORAGE_DIRECTORY: '/tmp/stored_dsatest',
            DataSetDriverConfigKeys.PATTERN: 'node59p1.dat',
            DataSetDriverConfigKeys.FREQUENCY: 1,
        },
        DataSourceConfigKey.PARSER: {}
    }
)

SAMPLE_STREAM = 'dostad_parsed'

###############################################################################
#                            INTEGRATION TESTS                                #
# Device specific integration tests are for                                   #
# testing device specific capabilities                                        #
开发者ID:j2project,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py

示例15:

# Fill in driver details
DataSetTestCase.initialize(
    driver_module='mi.dataset.driver.spkir_abj.dcl.driver',
    driver_class='SpkirAbjDclDataSetDriver',
    agent_resource_id = '123xyz',
    agent_name = 'Agent007',
    agent_packet_config = SpkirAbjDclDataSetDriver.stream_config(),
    startup_config = {
        DataSourceConfigKey.HARVESTER:
        {
            DataTypeKey.SPKIR_ABJ_RECOVERED:
            {
                DataSetDriverConfigKeys.DIRECTORY: REC_DIR,
                DataSetDriverConfigKeys.PATTERN: '[0-9]*.spkir*.log',
                DataSetDriverConfigKeys.FREQUENCY: 1,
                DataSetDriverConfigKeys.FILE_MOD_WAIT_TIME: 30,
            },
            DataTypeKey.SPKIR_ABJ_TELEMETERED:
            {
                DataSetDriverConfigKeys.DIRECTORY: TEL_DIR,
                DataSetDriverConfigKeys.PATTERN: '[0-9]*.spkir*.log',
                DataSetDriverConfigKeys.FREQUENCY: 1,
                DataSetDriverConfigKeys.FILE_MOD_WAIT_TIME: 30,
            },
        },
        DataSourceConfigKey.PARSER: {
            DataTypeKey.SPKIR_ABJ_RECOVERED: {},
            DataTypeKey.SPKIR_ABJ_TELEMETERED: {}
        }
    }
)
开发者ID:JeffRoy,项目名称:marine-integrations,代码行数:31,代码来源:test_driver.py


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