Exemplo n.º 1
0
def test_create():
    from sprokit.pipeline import datum
    from sprokit.pipeline import process

    process.ProcessType()
    process.ProcessTypes()
    process.ProcessName()
    process.ProcessNames()
    process.ProcessProperty()
    process.ProcessProperties()
    process.PortDescription()
    process.PortFrequency(1)
    process.PortFrequency(1, 1)
    process.Port()
    process.Ports()
    process.PortType()
    process.PortFlag()
    process.PortFlags()
    process.PortAddr()
    process.PortAddrs()
    process.Connection()
    process.Connections()
    process.PortInfo('type', process.PortFlags(), 'desc',
                     process.PortFrequency(1, 1))
    process.ConfInfo('default', 'desc', False)
    process.DataInfo(True, datum.DatumType.invalid)
    process.DataCheck.none
    process.DataCheck.sync
    process.DataCheck.valid
Exemplo n.º 2
0
def test_api_calls():
    from sprokit.pipeline import datum
    from sprokit.pipeline import process

    a = process.PortAddr()
    a.process
    a.port
    a.process = ''
    a.port = ''

    f = process.PortFrequency(1, 1)

    a = process.PortInfo('type', process.PortFlags(), 'desc', f)
    a.type
    a.flags
    a.description
    a.frequency

    a = process.ConfInfo('default', 'desc', False)
    a.default
    a.description
    a.tunable

    a = process.DataInfo(True, datum.DatumType.invalid)
    a.in_sync
    a.max_status

    process.PythonProcess.property_no_threads
    process.PythonProcess.property_no_reentrancy
    process.PythonProcess.property_unsync_input
    process.PythonProcess.property_unsync_output
    process.PythonProcess.port_heartbeat
    process.PythonProcess.config_name
    process.PythonProcess.config_type
    process.PythonProcess.type_any
    process.PythonProcess.type_none
    process.PythonProcess.type_data_dependent
    process.PythonProcess.type_flow_dependent
    process.PythonProcess.flag_output_const
    process.PythonProcess.flag_output_shared
    process.PythonProcess.flag_input_static
    process.PythonProcess.flag_input_mutable
    process.PythonProcess.flag_input_nodep
    process.PythonProcess.flag_required
Exemplo n.º 3
0
def test_api_calls(path_unused):
    from sprokit.pipeline import config
    from sprokit.pipeline import process
    from sprokit.pipeline import process_registry
    from sprokit.pipeline_util import load

    o = load.ConfigKeyOptions()
    o.flags
    o.provider
    o.flags = load.ConfigFlags()
    o.provider = load.ConfigProvider()

    o = load.ConfigKey()
    o.key_path
    o.options
    o.key_path = config.ConfigKeys()
    o.options = load.ConfigKeyOptions()

    o = load.ConfigValue()
    o.key
    o.value
    o.key = load.ConfigKey()
    o.value = config.ConfigValue()

    o = load.ConfigBlock()
    o.key
    o.values
    o.key = config.ConfigKeys()
    o.values = load.ConfigValues()

    o = load.ProcessBlock()
    o.name
    o.type
    o.config_values
    o.name = process.ProcessName()
    o.type = process.ProcessType()
    o.config_values = load.ConfigValues()

    o = load.ConnectBlock()
    o.from_
    o.to
    o.from_ = process.PortAddr()
    o.to = process.PortAddr()

    o = load.PipeBlock()
    o.config = load.ConfigBlock()
    o.config
    o.process = load.ProcessBlock()
    o.process
    o.connect = load.ConnectBlock()
    o.connect

    o = load.ClusterConfig()
    o.description
    o.config_value
    o.description = config.ConfigDescription()
    o.config_value = load.ConfigValue()

    o = load.ClusterInput()
    o.description
    o.from_
    o.targets
    o.description = process.PortDescription()
    o.from_ = process.Port()
    o.targets = process.PortAddrs()

    o = load.ClusterOutput()
    o.description
    o.from_
    o.to
    o.description = process.PortDescription()
    o.from_ = process.PortAddr()
    o.to = process.Port()

    o = load.ClusterSubblock()
    o.config = load.ClusterConfig()
    if o.config is None:
        test_error("The 'config' is None when the cluster subblock is a config")
    if o.input is not None:
        test_error("The 'input' is not None when the cluster subblock is a config")
    if o.output is not None:
        test_error("The 'output' is not None when the cluster subblock is a config")
    o.input = load.ClusterInput()
    if o.config is not None:
        test_error("The 'config' is not None when the cluster subblock is an input")
    if o.input is None:
        test_error("The 'input' is None when the cluster subblock is an input")
    if o.output is not None:
        test_error("The 'output' is not None when the cluster subblock is an input")
    o.output = load.ClusterOutput()
    if o.config is not None:
        test_error("The 'config' is not None when the cluster subblock is an output")
    if o.input is not None:
        test_error("The 'input' is not None when the cluster subblock is an output")
    if o.output is None:
        test_error("The 'output' is None when the cluster subblock is an output")

    o = load.ClusterBlock()
    o.type
    o.description
    o.subblocks
    o.type = process.ProcessType()
    o.description = process_registry.ProcessDescription()
    o.subblocks = load.ClusterSubblocks()

    o = load.ClusterDefineBlock()
    o.config = load.ConfigBlock()
    if o.config is None:
        test_error("The 'config' is None when the pipe subblock is a config")
    if o.process is not None:
        test_error("The 'process' is not None when the pipe subblock is a config")
    if o.connect is not None:
        test_error("The 'connect' is not None when the pipe subblock is a config")
    if o.cluster is not None:
        test_error("The 'cluster' is not None when the pipe subblock is a config")
    o.process = load.ProcessBlock()
    if o.config is not None:
        test_error("The 'config' is not None when the pipe subblock is a process")
    if o.process is None:
        test_error("The 'process' is None when the pipe subblock is a process")
    if o.connect is not None:
        test_error("The 'connect' is not None when the pipe subblock is a process")
    if o.cluster is not None:
        test_error("The 'cluster' is not None when the pipe subblock is a process")
    o.connect = load.ConnectBlock()
    if o.config is not None:
        test_error("The 'config' is not None when the pipe subblock is a connection")
    if o.process is not None:
        test_error("The 'process' is not None when the pipe subblock is a connection")
    if o.connect is None:
        test_error("The 'connect' is None when the pipe subblock is a connection")
    if o.cluster is not None:
        test_error("The 'cluster' is not None when the pipe subblock is a connection")
    o.cluster = load.ClusterBlock()
    if o.config is not None:
        test_error("The 'config' is not None when the pipe subblock is a cluster")
    if o.process is not None:
        test_error("The 'process' is not None when the pipe subblock is a cluster")
    if o.connect is not None:
        test_error("The 'connect' is not None when the pipe subblock is a cluster")
    if o.cluster is None:
        test_error("The 'cluster' is None when the pipe subblock is a cluster")
Exemplo n.º 4
0
def test_api_calls(path_unused):
    from sprokit.pipeline import config
    from sprokit.pipeline import process
    from sprokit.pipeline import process_factory
    from sprokit.pipeline_util import load

    o = load.ConfigValue()
    o.key
    o.value
    o.value = ''

    o = load.ConfigBlock()
    o.key
    o.values
    o.values = load.ConfigValues()

    o = load.ProcessBlock()
    o.name
    o.type
    o.config_values
    o.name = ''
    o.type = ''
    o.config_values = load.ConfigValues()

    o = load.ConnectBlock()
    o.from_
    o.to
    o.from_ = process.PortAddr().getAddr()
    o.to = process.PortAddr().getAddr()

    o = load.PipeBlock()
    o.config = load.ConfigBlock()
    o.config
    o.process = load.ProcessBlock()
    o.process
    o.connect = load.ConnectBlock()
    o.connect

    o = load.ClusterConfig()
    o.description
    o.config_value
    o.description = ''
    o.config_value = load.ConfigValue()

    o = load.ClusterInput()
    o.description
    o.from_
    o.targets
    o.description = ''
    o.from_ = ''
    o.targets = process.PortAddrs()

    o = load.ClusterOutput()
    o.description
    o.from_
    o.to
    o.description = ''
    o.from_ = process.PortAddr().getAddr()
    o.to = ''

    o = load.ClusterSubblock()
    o.config = load.ClusterConfig()
    if o.config is None:
        test_error(
            "The 'config' is None when the cluster subblock is a config")
    if o.input is not None:
        test_error(
            "The 'input' is not None when the cluster subblock is a config")
    if o.output is not None:
        test_error(
            "The 'output' is not None when the cluster subblock is a config")
    o.input = load.ClusterInput()
    if o.config is not None:
        test_error(
            "The 'config' is not None when the cluster subblock is an input")
    if o.input is None:
        test_error("The 'input' is None when the cluster subblock is an input")
    if o.output is not None:
        test_error(
            "The 'output' is not None when the cluster subblock is an input")
    o.output = load.ClusterOutput()
    if o.config is not None:
        test_error(
            "The 'config' is not None when the cluster subblock is an output")
    if o.input is not None:
        test_error(
            "The 'input' is not None when the cluster subblock is an output")
    if o.output is None:
        test_error(
            "The 'output' is None when the cluster subblock is an output")

    o = load.ClusterBlock()
    o.type
    o.description
    o.subblocks
    o.type = ''
    o.description = ''
    o.subblocks = load.ClusterSubblocks()

    o = load.ClusterDefineBlock()
    o.config = load.ConfigBlock()
    if o.config is None:
        test_error("The 'config' is None when the pipe subblock is a config")
    if o.process is not None:
        test_error(
            "The 'process' is not None when the pipe subblock is a config")
    if o.connect is not None:
        test_error(
            "The 'connect' is not None when the pipe subblock is a config")
    if o.cluster is not None:
        test_error(
            "The 'cluster' is not None when the pipe subblock is a config")
    o.process = load.ProcessBlock()
    if o.config is not None:
        test_error(
            "The 'config' is not None when the pipe subblock is a process")
    if o.process is None:
        test_error("The 'process' is None when the pipe subblock is a process")
    if o.connect is not None:
        test_error(
            "The 'connect' is not None when the pipe subblock is a process")
    if o.cluster is not None:
        test_error(
            "The 'cluster' is not None when the pipe subblock is a process")
    o.connect = load.ConnectBlock()
    if o.config is not None:
        test_error(
            "The 'config' is not None when the pipe subblock is a connection")
    if o.process is not None:
        test_error(
            "The 'process' is not None when the pipe subblock is a connection")
    if o.connect is None:
        test_error(
            "The 'connect' is None when the pipe subblock is a connection")
    if o.cluster is not None:
        test_error(
            "The 'cluster' is not None when the pipe subblock is a connection")
    o.cluster = load.ClusterBlock()
    if o.config is not None:
        test_error(
            "The 'config' is not None when the pipe subblock is a cluster")
    if o.process is not None:
        test_error(
            "The 'process' is not None when the pipe subblock is a cluster")
    if o.connect is not None:
        test_error(
            "The 'connect' is not None when the pipe subblock is a cluster")
    if o.cluster is None:
        test_error("The 'cluster' is None when the pipe subblock is a cluster")