It fixes a typo and changes an if statement to an assert. The if that is replaced contains a list of operations, which forces us to modify it whenever we add a test of new operation. All these operations are listed in conditions of if statements that are a few lines above. If an operation doesn't have a corresponding if statement, the result variable is None, which is checked by an assert, which I added.
It fixes a typo and changes an
if
statement to anassert
. Theif
that is replaced contains a list of operations, which forces us to modify it whenever we add a test of new operation. All these operations are listed in conditions ofif
statements that are a few lines above. If an operation doesn't have a correspondingif
statement, theresult
variable isNone
, which is checked by an assert, which I added.