Пример #1
0
def test_root2hdf5_chunked_selected():
    try:
        import tables
    except ImportError:
        raise SkipTest

    from rootpy.root2hdf5 import root2hdf5, tables_open

    rfile = get_file('test_tree.root')
    hfilename = os.path.join(TEMPDIR, 'out.h5')
    root2hdf5(rfile, hfilename, entries=90, selection='i % 2 == 0')

    hfile = tables_open(hfilename)
    assert_equal(len(hfile.root.test), 500)
    hfile.close()
Пример #2
0
def test_root2hdf5_chunked_selected():
    try:
        import tables
    except ImportError:
        raise SkipTest

    from rootpy.root2hdf5 import root2hdf5, tables_open

    rfile = get_file("test_tree.root")
    hfilename = os.path.join(TEMPDIR, "out.h5")
    root2hdf5(rfile, hfilename, entries=90, selection="i % 2 == 0")

    hfile = tables_open(hfilename)
    assert_equal(len(hfile.root.test), 500)
    hfile.close()
Пример #3
0
def test_root2hdf5():
    try:
        import tables
    except ImportError:
        raise SkipTest

    from rootpy.root2hdf5 import root2hdf5, tables_open

    rfile = get_file('test_tree.root')
    hfilename = os.path.join(TEMPDIR, 'out.h5')
    root2hdf5(rfile, hfilename)

    hfile = tables_open(hfilename)
    assert_equal(len(hfile.root.test), 1000)
    hfile.close()
Пример #4
0
def test_root2hdf5():
    try:
        import tables
    except ImportError:
        raise SkipTest

    from rootpy.root2hdf5 import root2hdf5, tables_open

    rfile = get_file("test_tree.root")
    hfilename = os.path.join(TEMPDIR, "out.h5")
    root2hdf5(rfile, hfilename)

    hfile = tables_open(hfilename)
    assert_equal(len(hfile.root.test), 1000)
    hfile.close()