From c0fea0709bf21aba6ecf8fb647b4e48a89b3fcbb Mon Sep 17 00:00:00 2001 From: Jeff Quast Date: Mon, 21 Sep 2015 13:29:42 -0700 Subject: use /bin/echo instead of PYTHONBIN for argv test --- tests/test_unicode.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/test_unicode.py b/tests/test_unicode.py index 5d65c73..55632c3 100644 --- a/tests/test_unicode.py +++ b/tests/test_unicode.py @@ -175,18 +175,12 @@ class UnicodeTests(PexpectTestCase.PexpectTestCase): def test_unicode_argv(self): """ Ensure a program can be executed with unicode arguments. """ - p = pexpect.spawn(u'{self.PYTHONBIN} sleep_for.py ǝpoɔıun' - .format(self=self), timeout=5, encoding='utf8') - # we expect the program to error, and display a ValueError for the - # float literal. It will also print it back to us, with the exception - # of PyPy, which seems to use a form of repr() of the bytestream. - if platform.python_implementation() == 'PyPy': - p.expect(u'ǝpoɔıun') - else: - p.expect(ur'\\xc7\\x9dpo\\xc9\\x94\\xc4\\xb1un') + p = pexpect.spawn(u'echo ǝpoɔıun'.format(self=self), + timeout=5, encoding='utf8') + p.expect(u'ǝpoɔıun') p.expect(pexpect.EOF) assert not p.isalive() - assert p.exitstatus != 0 # child process could not convert to float + assert p.exitstatus == 0 if __name__ == '__main__': unittest.main() -- cgit v1.2.1