Example #1
0
def test_node_composite_add_origin():
    original = utilities.fake_single_sweep_stream()
    io = memory.Dictionary()
    name = 'sweep_stream'
    io.write(original, name)
    ss = io.read(name)
    ss_df = ss.to_dataframe()
    for k, row in ss_df.iterrows():
        assert row.io_class == 'Dictionary'
        assert row.root_path is None
        assert row.node_path == core.join('/', name)
    sweep = io.read(core.join(name, 'sweep'))
    stream = io.read(core.join(name, 'stream'))
    composite = basic.SingleSweepStream(sweep=sweep, stream=stream)
    composite_df = composite.to_dataframe()
    for k, row in composite_df.iterrows():
        assert row.io_class is None
        assert row.root_path is None
        assert row.node_path is None
        assert row['sweep.io_class'] == 'Dictionary'
        assert row['sweep.root_path'] is None
        assert row['sweep.node_path'] == core.join('/', name, 'sweep')
        assert row['stream.io_class'] == 'Dictionary'
        assert row['stream.root_path'] is None
        assert row['stream.node_path'] == core.join('/', name, 'stream')
Example #2
0
def test_node_composite_add_origin():
    original = utilities.fake_single_sweep_stream()
    io = memory.Dictionary()
    name = 'sweep_stream'
    io.write(original, name)
    ss = io.read(name)
    ss_df = ss.to_dataframe()
    for k, row in ss_df.iterrows():
        assert row.io_class == 'Dictionary'
        assert row.root_path is None
        assert row.node_path == core.join('/', name)
    sweep = io.read(core.join(name, 'sweep'))
    stream = io.read(core.join(name, 'stream'))
    composite = basic.SingleSweepStream(sweep=sweep, stream=stream)
    composite_df = composite.to_dataframe()
    for k, row in composite_df.iterrows():
        assert row.io_class is None
        assert row.root_path is None
        assert row.node_path is None
        assert row['sweep.io_class'] == 'Dictionary'
        assert row['sweep.root_path'] is None
        assert row['sweep.node_path'] == core.join('/', name, 'sweep')
        assert row['stream.io_class'] == 'Dictionary'
        assert row['stream.root_path'] is None
        assert row['stream.node_path'] == core.join('/', name, 'stream')
Example #3
0
 def setup(cls):
     cls.sss = utilities.fake_single_sweep_stream()
Example #4
0
 def setup(cls):
     cls.sss = utilities.fake_single_sweep_stream()