Remove elifs and replace with else + assert

This is kind of ugly, but resolves many partial branch coverage issues.
3 files changed