Skip to content

Commit

Permalink
update assertions and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Meech committed Mar 25, 2024
1 parent 436e278 commit e5e58e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion brainglobe_utils/cells/cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class Cell:
Cell type represented by an integer: 1 for unknown/no cell,
2 for cell, -1 for artifact. The usual way to set this is to use:
Cell.ARTIFACT, Cell.CELL, Cell.UNKNOWN, or Cell.NO_CELL as input.
You can also pass "cell" or "no_cell", as well as None.
You can also pass "cell" or "no_cell", as well as None (which will
map to Cell.UNKNOWN).
Attributes
----------
Expand Down
10 changes: 5 additions & 5 deletions tests/tests/test_cells/test_cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_group_cells_by_z(
z_planes_test = list(cells_groups.keys())
z_planes_test.sort()

assert z_planes_validate == z_planes_test
assert z_planes_test == z_planes_validate

cell_numbers_in_groups_test = [
len(cells_groups[plane]) for plane in z_planes_test
Expand Down Expand Up @@ -148,18 +148,18 @@ def test_cell_soft_transform(
start_position = [1, 1, 1]
cell = cells.Cell(start_position, cells.Cell.CELL)

assert start_position == [cell.x, cell.y, cell.z]
assert [cell.x, cell.y, cell.z] == start_position

cell.soft_transform(
x_scale, y_scale, z_scale, x_offset, y_offset, z_offset, integer
)

assert expected == [
assert [
cell.transformed_x,
cell.transformed_y,
cell.transformed_z,
]
assert start_position == [cell.x, cell.y, cell.z]
] == expected
assert [cell.x, cell.y, cell.z] == start_position


def test_cell_flip_xy():
Expand Down

0 comments on commit e5e58e5

Please sign in to comment.