This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients ggenellina, guettli, hoffman, news1234, pakal, r.david.murray, vinay.sajip, ysj.ray
Date 2010-10-09.19:04:09
SpamBayes Score 7.65788e-05
Marked as misclassified No
Message-id <1286651051.45.0.355648146933.issue1553375@psf.upfronthosting.co.za>
In-reply-to
Content
David, I don't think it's that - I think it's the subprocess comms. This works:

    def _do_test(self, program, exc_text):
        with open(self.testfn, 'w') as testmod:
            testmod.writelines(program.format(
                exception_action=self.exception_action))
        p = subprocess.Popen([sys.executable, 'testmod.py'],
                              stderr=subprocess.PIPE)
        streams = p.communicate()
        v1 = streams[1].decode('utf-8') # this shouldn't be hardcoded!
        v2 = exc_text.format(exception_action=self.exception_action)
        self.assertEqual(v1, v2)

But I don't think the 'utf-8' encoding should be hardcoded. Not sure what to use - sys.getfilesystemencoding()? locale.getpreferredencoding()? 

Decisions, decisions :-(
History
Date User Action Args
2010-10-09 19:04:11vinay.sajipsetrecipients: + vinay.sajip, guettli, hoffman, ggenellina, pakal, r.david.murray, news1234, ysj.ray
2010-10-09 19:04:11vinay.sajipsetmessageid: <1286651051.45.0.355648146933.issue1553375@psf.upfronthosting.co.za>
2010-10-09 19:04:10vinay.sajiplinkissue1553375 messages
2010-10-09 19:04:09vinay.sajipcreate