Closed samwaseda closed 3 months ago
Coverage variation | Diff coverage |
---|---|
:white_check_mark: -0.01% (target: -1.00%) | :white_check_mark: 83.33% |
You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
macro.py | 12 | 89.4% | ||
<!-- | Total: | 12 | --> |
Totals | |
---|---|
Change from base Build 8210165337: | -0.01% |
Covered Lines: | 5841 |
Relevant Lines: | 6363 |
Oh, and we need a test added that catches the new message
Ok, I've got my computer and I stand by everything I said earlier. More specifically, somewhere in here:
I'd slot in a new method like self._ensure_returned_objects_are_has_channels
(or similar) that does the check you want. This is perfectly in line with the variable name, it's just that right now the code assumes that the user has correctly returned only HasChannel
objects. I totally agree that's an easy mistake though, so let's add the filtering. To fail as early as possible I recommend inserting the check immediately after line 313.
In the future we could even imagine extending the check to create channel objects from non-HasChannel returns. This heads in the direction of getting macro and function nodes to be more similar, and is absolutely not necessary here and now, but I like that this change is commensurate with that direction.
Ok I messed around. In the end I didn't put it in __init__
, because for my taste there are already too many lines. I also added a test.
Ugh, my rerun failed jobs button has no effect. I'm not sure if it's a problem with my browser or what, but this happens sometimes. @samwaseda could you rerun the failed windows test before merging?
I keep making a mistake like this:
The main problem is that in the current implementation it only says
NOT_DATA
does not havechannel
, which doesn't immediately make me understand where the error is coming from.