@@ -0,0 +1,1412 @@
+# Tai Sakuma %3Ctai.sakuma@gmail.com%3E%0Aimport os%0Aimport sys%0Aimport pytest%0A%0Ahas_no_ROOT = False%0Atry:%0A    import ROOT%0Aexcept ImportError:%0A    has_no_ROOT = True%0A%0Aif not has_no_ROOT:%0A    from alphatwirl.roottree import BEvents as Events%0A    from alphatwirl.roottree import Branch%0A%0A##__________________________________________________________________%7C%7C%0Apytestmark = pytest.mark.skipif(has_no_ROOT, reason=%22has no ROOT%22)%0A%0A##__________________________________________________________________%7C%7C%0A@pytest.fixture()%0Adef chain():%0A    input_file_names = %5B%0A        'sample_chain_01.root',%0A        'sample_chain_02.root',%0A        'sample_chain_03.root',%0A    %5D%0A    input_paths = %5B%0A        os.path.join(os.path.dirname(os.path.realpath(__file__)), n)%0A        for n in input_file_names%0A    %5D%0A    tree_name = 'tree'%0A    chain = ROOT.TChain(tree_name)%0A    for p in input_paths:%0A        chain.Add(p)%0A    yield chain%0A%0A@pytest.fixture()%0Adef events(chain):%0A    yield Events(chain)%0A%0Adef test_event(events):%0A%0A    content_list = %5B%0A        # file 1%0A        %5B10, 20, 30%5D,%0A        %5B24, 5%5D,%0A%0A        # file 2%0A        %5B3, 10%5D,%0A        %5B5, 8, 32, 15, 2%5D,%0A        %5B22, 11%5D,%0A%0A        # file 3%0A        %5B2, 7%5D,%0A        %5B10, 100%5D,%0A    %5D%0A%0A    for i, c in enumerate(content_list):%0A        event = events%5Bi%5D%0A        assert len(c) == event.nvar%5B0%5D%0A        assert c == list(event.var)%0A%0A##__________________________________________________________________%7C%7C%0A

add test_BEvents_sample_chain.py