Skip to content

Commit

Permalink
Remove test return values
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicasyu committed Sep 16, 2024
1 parent b5f2121 commit ae6d60d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions tests/arcade_collection/convert/test_convert_to_contours.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def setUp(self):
self.frame = 5
self.file = f"{self.series_key}_{self.frame:06d}.LOCATIONS.json"

def test_convert_to_contours_no_voxels(self) -> None:
def test_convert_to_contours_no_voxels(self):
regions = ["DEFAULT"]
box = (1, 1, 1)
indices = {"top": [1]}
Expand All @@ -34,7 +34,7 @@ def test_convert_to_contours_no_voxels(self) -> None:

self.assertDictEqual(expected_contours, contours)

def test_convert_to_contours_no_index(self) -> None:
def test_convert_to_contours_no_index(self):
regions = ["DEFAULT"]
box = (3, 3, 3)
indices = {"top": [1]}
Expand All @@ -57,7 +57,7 @@ def test_convert_to_contours_no_index(self) -> None:

self.assertDictEqual(expected_contours, contours)

def test_convert_to_contours_different_views(self) -> None:
def test_convert_to_contours_different_views(self):
regions = ["DEFAULT"]
box = (4, 5, 6)
indices = {"top": [1], "side1": [1], "side2": [1]}
Expand Down Expand Up @@ -148,7 +148,7 @@ def test_convert_to_contours_different_views(self) -> None:

self.assertDictEqual(expected_contours, contours)

def test_convert_to_contours_multiple_regions(self) -> None:
def test_convert_to_contours_multiple_regions(self):
regions = ["DEFAULT", "REGION_A", "REGION_B"]
box = (4, 5, 6)
indices = {"top": [1]}
Expand Down Expand Up @@ -199,7 +199,7 @@ def test_convert_to_contours_multiple_regions(self) -> None:

self.assertDictEqual(expected_contours, contours)

def test_convert_to_contours_disconnected_location(self) -> None:
def test_convert_to_contours_disconnected_location(self):
regions = ["DEFAULT"]
box = (5, 6, 6)
indices = {"top": [1]}
Expand Down Expand Up @@ -261,7 +261,7 @@ def test_convert_to_contours_disconnected_location(self) -> None:

self.assertDictEqual(expected_contours, contours)

def test_convert_to_contours_multiple_locations(self) -> None:
def test_convert_to_contours_multiple_locations(self):
regions = ["DEFAULT"]
box = (4, 5, 6)
indices = {"top": [1]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class TestConvertToSimulariumObjects(unittest.TestCase):
def test_convert_to_simularium_objects_potts(self) -> None:
def test_convert_to_simularium_objects_potts(self):
series_key = "SERIES_KEY"
simulation_type = "potts"
categories = pd.DataFrame(
Expand Down Expand Up @@ -150,7 +150,7 @@ def make_bundle_data(object_id, display_index):
self.assertDictEqual(model_info, trajectory_info["modelInfo"])
self.assertListEqual(bundle_data, simularium["spatialData"]["bundleData"])

def test_convert_to_simularium_objects_invalid_type_throws_exception(self) -> None:
def test_convert_to_simularium_objects_invalid_type_throws_exception(self):
with self.assertRaises(ValueError):
simulation_type = "invalid_type"
convert_to_simularium_objects(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


class TestConvertToSimulariumShapes(unittest.TestCase):
def test_convert_to_simularium_shapes_patch_invalid_data(self) -> None:
def test_convert_to_simularium_shapes_patch_invalid_data(self):
simulation_type = "patch"
simularium = convert_to_simularium_shapes(
"", simulation_type, {"invalid": None}, (0, 0, 0), (0, 0, 0), (0, 0, 0), 0, {}
Expand All @@ -32,7 +32,7 @@ def test_convert_to_simularium_shapes_patch_invalid_data(self) -> None:
"random",
return_value=mock.Mock(),
)
def test_convert_to_simularium_shapes_patch_with_cells(self, random_mock) -> None:
def test_convert_to_simularium_shapes_patch_with_cells(self, random_mock):
series_key = "SERIES_KEY"

contents = {
Expand Down Expand Up @@ -172,7 +172,7 @@ def make_bundle_data(object_id, display_index, radius, uvw, z, offset):
"random",
return_value=mock.Mock(),
)
def test_convert_to_simularium_shapes_patch_with_graph(self, random_mock) -> None:
def test_convert_to_simularium_shapes_patch_with_graph(self, random_mock):
series_key = "SERIES_KEY"

contents = {
Expand Down Expand Up @@ -333,14 +333,14 @@ def make_bundle_data(object_id, display_index, radius, length, width, point1, po
self.assertDictEqual(type_mapping, trajectory_info["typeMapping"])
self.assertListEqual(bundle_data, simularium["spatialData"]["bundleData"])

def test_convert_to_simularium_shapes_potts_invalid_data(self) -> None:
def test_convert_to_simularium_shapes_potts_invalid_data(self):
simulation_type = "potts"
simularium = convert_to_simularium_shapes(
"", simulation_type, {"invalid": None}, (0, 0, 0), (0, 0, 0), (0, 0, 0), 0, {}
)
self.assertEqual("", simularium)

def test_convert_to_simularium_shapes_potts_resolution_zero(self) -> None:
def test_convert_to_simularium_shapes_potts_resolution_zero(self):
series_key = "SERIES_KEY"

cells_contents = {
Expand Down Expand Up @@ -492,7 +492,7 @@ def make_bundle_data(object_id, display_index, center, voxels):
self.assertDictEqual(type_mapping, trajectory_info["typeMapping"])
self.assertListEqual(bundle_data, simularium["spatialData"]["bundleData"])

def test_convert_to_simularium_shapes_potts_resolution_one(self) -> None:
def test_convert_to_simularium_shapes_potts_resolution_one(self):
series_key = "SERIES_KEY"

hollow_cube_voxels = [[x, y, z] for x in range(3) for y in range(3) for z in range(3)]
Expand Down Expand Up @@ -628,7 +628,7 @@ def make_bundle_data(object_id, display_index, voxels):
self.assertDictEqual(type_mapping, trajectory_info["typeMapping"])
self.assertListEqual(bundle_data, simularium["spatialData"]["bundleData"])

def test_convert_to_simularium_shapes_potts_resolution_two(self) -> None:
def test_convert_to_simularium_shapes_potts_resolution_two(self):
series_key = "SERIES_KEY"

hollow_cube_voxels = [[x, y, z] for x in range(6) for y in range(6) for z in range(6)]
Expand Down Expand Up @@ -769,7 +769,7 @@ def make_bundle_data(object_id, display_index, voxels):
self.assertDictEqual(type_mapping, trajectory_info["typeMapping"])
self.assertListEqual(bundle_data, simularium["spatialData"]["bundleData"])

def test_convert_to_simularium_shapes_invalid_type_throws_exception(self) -> None:
def test_convert_to_simularium_shapes_invalid_type_throws_exception(self):
with self.assertRaises(ValueError):
simulation_type = "invalid_type"
convert_to_simularium_shapes(
Expand Down

0 comments on commit ae6d60d

Please sign in to comment.