Hoist assignment to simplify a conditional
pygobject3: added comment to clarify which tests are which.