9's complement and tests in PyPath