def test_getArrays_no_branch(self):

        manager = BranchAddressManager()

        array_zet_pt, array_zet_pt_count = manager.getArrays(self.tree1, 'zet_pt')
        self.assertIsNone(array_zet_pt)
        self.assertIsNone(array_zet_pt_count)
    def test_getArrays_same_objects(self):

        manager = BranchAddressManager()

        array_jet_pt_1, array_jet_pt_count_1 = manager.getArrays(self.tree1, 'jet_pt')
        array_jet_pt_2, array_jet_pt_count_2 = manager.getArrays(self.tree1, 'jet_pt')
        self.assertIs(array_jet_pt_1, array_jet_pt_2)
        self.assertIs(array_jet_pt_count_1, array_jet_pt_count_2)
    def test_getArrays_no_count(self):

        manager = BranchAddressManager()

        array_met_pt, array_met_pt_count = manager.getArrays(self.tree1, 'met_pt')
        self.assertEqual('d', array_met_pt.typecode)
        self.assertEqual(1, array_met_pt.buffer_info()[1])
        self.assertIsNone(array_met_pt_count)
    def test_getArrays_no_branch(self):

        manager = BranchAddressManager()

        array_zet_pt, array_zet_pt_count = manager.getArrays(
            self.tree1, 'zet_pt')
        self.assertIsNone(array_zet_pt)
        self.assertIsNone(array_zet_pt_count)
    def test_getArrays_same_objects_different_managers(self):

        manager1 = BranchAddressManager()
        manager2 = BranchAddressManager()

        array_jet_pt_1, array_jet_pt_count_1 = manager1.getArrays(self.tree1, 'jet_pt')
        array_jet_pt_2, array_jet_pt_count_2 = manager2.getArrays(self.tree1, 'jet_pt')
        self.assertIs(array_jet_pt_1, array_jet_pt_2)
        self.assertIs(array_jet_pt_count_1, array_jet_pt_count_2)
    def test_getArrays(self):

        manager = BranchAddressManager()

        array_jet_pt, array_jet_pt_count = manager.getArrays(self.tree1, 'jet_pt')
        self.assertEqual('d', array_jet_pt.typecode)
        self.assertEqual(13, array_jet_pt.buffer_info()[1])
        self.assertEqual('i', array_jet_pt_count.typecode)
        self.assertEqual(1, array_jet_pt_count.buffer_info()[1])
    def test_getArrays_no_count(self):

        manager = BranchAddressManager()

        array_met_pt, array_met_pt_count = manager.getArrays(
            self.tree1, 'met_pt')
        self.assertEqual('d', array_met_pt.typecode)
        self.assertEqual(1, array_met_pt.buffer_info()[1])
        self.assertIsNone(array_met_pt_count)
    def test_getArrays_same_objects(self):

        manager = BranchAddressManager()

        array_jet_pt_1, array_jet_pt_count_1 = manager.getArrays(
            self.tree1, 'jet_pt')
        array_jet_pt_2, array_jet_pt_count_2 = manager.getArrays(
            self.tree1, 'jet_pt')
        self.assertIs(array_jet_pt_1, array_jet_pt_2)
        self.assertIs(array_jet_pt_count_1, array_jet_pt_count_2)
    def test_getArrays(self):

        manager = BranchAddressManager()

        array_jet_pt, array_jet_pt_count = manager.getArrays(
            self.tree1, 'jet_pt')
        self.assertEqual('d', array_jet_pt.typecode)
        self.assertEqual(13, array_jet_pt.buffer_info()[1])
        self.assertEqual('i', array_jet_pt_count.typecode)
        self.assertEqual(1, array_jet_pt_count.buffer_info()[1])
    def test_getArrays_same_objects_different_managers(self):

        manager1 = BranchAddressManager()
        manager2 = BranchAddressManager()

        array_jet_pt_1, array_jet_pt_count_1 = manager1.getArrays(
            self.tree1, 'jet_pt')
        array_jet_pt_2, array_jet_pt_count_2 = manager2.getArrays(
            self.tree1, 'jet_pt')
        self.assertIs(array_jet_pt_1, array_jet_pt_2)
        self.assertIs(array_jet_pt_count_1, array_jet_pt_count_2)