Open weiglszonja opened 2 years ago
I'm all for code reduction, and it looks like it could do that in our testing suite. Better organization of tests is also always good, but having the tests to begin with is more important. This is also always something we can come back to but wouldn't give it highest priority
@weiglszonja if you are finding yourself wanting to write the same test for multiple objects, I think it's a good idea, particularly if those objects have the same parent. If you name the method to start with test_
then you don't even need to call it explicitly in child classes- the TestCase
parent will automatically run all methods that start with test_
as tests.
thanks for the input, I'll keep this in my backlog to revisit later.
This makes sense to me, check:
And assert_get_frames_return_shape(imaging_extractor=extractor)
specifically for something similar that we have enable for the imaging extractor pipeline.
While working on #188, and #187 I realised it might be useful to have tests for methods defined in
SegmentationExtractor
that can be reused when testing other segmentation extractors.The idea for instance, if we wanted to test
set_times
which is defined inSegmentationExtractor
, we wouldn't necessarily have to implement a test forset_times
in every segmentation extractors that we are creating unittests for in the future.I was thinking about something like this:
Which then can be used as TestCase for the other segmentation extractors and tests reused?
@CodyCBakerPhD @h-mayorquin Let me know what you think about it, maybe dummy idea .