From 44a0ea60dc97ee1fa3b2327b760265045dd92e7c Mon Sep 17 00:00:00 2001 From: Chris Byrohl <9221545+cbyrohl@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:04:24 +0200 Subject: [PATCH] minor fixes --- src/scida/customs/arepo/TNGcluster/dataset.py | 2 +- tests/customs/test_gadgetstyle.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/scida/customs/arepo/TNGcluster/dataset.py b/src/scida/customs/arepo/TNGcluster/dataset.py index 5c8f325d..351cbe43 100644 --- a/src/scida/customs/arepo/TNGcluster/dataset.py +++ b/src/scida/customs/arepo/TNGcluster/dataset.py @@ -91,7 +91,7 @@ def len_to_offsets(lengths): particles=len_to_offsets(self.lengths_zoom["particles"]) ) - if hasattr(self, "catalog"): + if hasattr(self, "catalog") and self.catalog is not None: self.lengths_zoom["groups"] = self.catalog.header["Ngroups_ThisFile"] self.offsets_zoom["groups"] = len_to_offsets(self.lengths_zoom["groups"]) self.lengths_zoom["subgroups"] = self.catalog.header["Nsubgroups_ThisFile"] diff --git a/tests/customs/test_gadgetstyle.py b/tests/customs/test_gadgetstyle.py index ee52769f..c2f3411e 100644 --- a/tests/customs/test_gadgetstyle.py +++ b/tests/customs/test_gadgetstyle.py @@ -1,6 +1,5 @@ -from testdata_properties import require_testdata_path - from scida import GadgetStyleSnapshot +from tests.testdata_properties import require_testdata_path @require_testdata_path("interface", only=["TNG50-4_group"])