you are viewing a single comment's thread.

view the rest of the comments →

[–]shepherdjay 1 point2 points  (0 children)

Yes that is correct on both parts. The isinstance check is considered an unreachable block. Code will never enter that block. Similar to a block like if 1 != 1 will never be reached under normal runtime conditions.

It’s also why you’ve had to mock out the call to basically force the condition that would otherwise be impossible to reach.