Skip to content

Commit

Permalink
fix errors raised and better test readability
Browse files Browse the repository at this point in the history
  • Loading branch information
true-real-michael committed Nov 15, 2023
1 parent 0d4753e commit 124ea79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion octreelib/grid/grid_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __post_init__(self):
)
if not issubclass(self.octree_type, OctreeBase):
raise TypeError(
f"Cannot use the provided octree type {self.octree_manager_type.__name__}. "
f"Cannot use the provided octree type {self.octree_type.__name__}. "
"It has to be a subclass of octree.OctreeBase."
)

Expand Down
8 changes: 4 additions & 4 deletions test/grid/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ def test_invalid_octree_type():
try:
Grid(
GridConfig(
octree_manager_type=Octree,
octree_manager_type=type(None),
octree_config=OctreeConfig(),
voxel_edge_length=5,
)
)
except TypeError as e:
assert str(e) == (
"Cannot use the provided octree manager type Octree. "
"Cannot use the provided octree manager type NoneType. "
"It has to be a subclass of octree_manager.OctreeManager."
)
else:
Expand All @@ -168,14 +168,14 @@ def test_invalid_octree_type():
Grid(
GridConfig(
octree_manager_type=OctreeManager,
octree_type=OctreeManager,
octree_type=type(None),
octree_config=OctreeConfig(),
voxel_edge_length=5,
)
)
except TypeError as e:
assert str(e) == (
"Cannot use the provided octree type OctreeManager. "
"Cannot use the provided octree type NoneType. "
"It has to be a subclass of octree.OctreeBase."
)
else:
Expand Down

0 comments on commit 124ea79

Please sign in to comment.