Nitpick, I'd like a comment by that try/except explaining the optparse problem we're working around and linking the upstream bug.
I get different behaviour on windows. Rather than throwing, it mangles the bytes. This breaks your test, and then the whole run as the fix for bug 633216 hasn't landed.
Suggests you could perhaps give optparse bytes on the nix path, then decode what you get back instead?
Nitpick, I'd like a comment by that try/except explaining the optparse problem we're working around and linking the upstream bug.
I get different behaviour on windows. Rather than throwing, it mangles the bytes. This breaks your test, and then the whole run as the fix for bug 633216 hasn't landed.
Suggests you could perhaps give optparse bytes on the nix path, then decode what you get back instead?