Skip to content

Commit

Permalink
Remove TODO re is_volume (#1803)
Browse files Browse the repository at this point in the history
This statement is not true.  Some filters will never accept is_volume (i.e., Reduce), so it is not generalizable.

Test plan: `pytest -v -n4 starfish/core/image/Filter/test`
Fixes #1772
  • Loading branch information
Tony Tung authored Feb 12, 2020
1 parent ee4597f commit 1e10dae
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions starfish/core/image/Filter/test/test_api_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,13 @@ def test_all_methods_adhere_to_contract(filter_class):

default_kwargs = filter_class._DEFAULT_TESTING_PARAMETERS

# TODO ambrosejcarr: all filters should accept boolean is_volume
instance = filter_class(**default_kwargs)

# TODO ambrosejcarr: all methods should process 3d data
# # stores is_volume, and is_volume is a bool
# try:
# volume_param = getattr(instance, 'is_volume')
# except AttributeError:
# raise AttributeError(f'{filter_class} should accept and store is_volume.')
#
# assert isinstance(volume_param, bool), \
# f'{filter_class} is_volume must be a bool, not {type(volume_param)}'

data = generate_default_data()

# Max Proj and Reduce don't have an in_place, n_processes, verbose option,
# Reduce don't have an in_place, n_processes, verbose option,
# so we need to skip these tests
if filter_class not in [Reduce]:
if filter_class not in (Reduce,):
# return None if in_place = True
try:
filtered = instance.run(data, in_place=True)
Expand Down

0 comments on commit 1e10dae

Please sign in to comment.