Skip to content
Snippets Groups Projects

Resolve "Missing status and mother_id in offline reader"

Merged Tamas Gal requested to merge 80-missing-methods into master
1 unresolved thread
+ 6
4
@@ -412,7 +412,7 @@ class TestOfflineTracks(unittest.TestCase):
self.f = OFFLINE_FILE
self.tracks = OFFLINE_FILE.events.tracks
self.tracks_numucc = OFFLINE_NUMUCC
self.mc_tracks = OFFLINE_MC_TRACK
self.mc_tracks = OFFLINE_MC_TRACK.mc_tracks
self.n_events = 10
self.status = [100, 5, 11, 15, 1, 12, 12, 12, 12, 12]
self.mother_id = [-1, -1, 1, 1, 0, 2, 5, 5, 6, 8]
@@ -433,8 +433,6 @@ class TestOfflineTracks(unittest.TestCase):
"rec_type",
"rec_stages",
"fitinf",
"status",
"mother_id",
]:
getattr(self.tracks, field)
@@ -443,7 +441,11 @@ class TestOfflineTracks(unittest.TestCase):
def test_mother_id(self):
assert np.allclose(self.mother_id, self.mc_tracks[1].mother_id[:10].tolist())
def test_attribute_error_raised_for_older_files(self):
with self.assertRaises(AttributeError):
self.tracks[1].mother_id
def test_item_selection(self):
self.assertListEqual(
list(self.tracks[0].dir_z[:2]), [-0.872885221293917, -0.872885221293917]
Loading