summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2015-09-21 13:29:42 -0700
committerJeff Quast <contact@jeffquast.com>2015-09-21 13:29:42 -0700
commitc0fea0709bf21aba6ecf8fb647b4e48a89b3fcbb (patch)
tree90d20fe875ecf23404f33c5ec1f3182421f86764
parent6ca747813437c0d4ea0ac49f060361d8a98a130a (diff)
downloadpexpect-unicode-argv.tar.gz
use /bin/echo instead of PYTHONBIN for argv testunicode-argv
-rw-r--r--tests/test_unicode.py14
1 files 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()