Navigation Menu

Skip to content

Commit

Permalink
Add simple test for non-ascii characters in system_raw call.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jörgen Stenarson committed Nov 17, 2011
1 parent fb3b776 commit b206d90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions IPython/core/interactiveshell.py
Expand Up @@ -2085,6 +2085,7 @@ def system_raw(self, cmd):
cmd = py3compat.unicode_to_str(cmd)
ec = os.system(cmd)
else:
cmd = py3compat.unicode_to_str(cmd)
ec = os.system(cmd)

# We explicitly do NOT return the subprocess status code, because
Expand Down
8 changes: 8 additions & 0 deletions IPython/core/tests/test_interactiveshell.py
Expand Up @@ -220,3 +220,11 @@ def test_1(self):
"""Test safe_execfile with non-ascii path
"""
_ip.shell.safe_execfile(self.fname, {}, raise_exceptions=True)


class TestSystemRaw(unittest.TestCase):
def test_1(self):
"""Test system_raw with non-ascii cmd
"""
cmd = ur'''python -c "u'åäö'" '''
_ip.shell.system_raw(cmd)

0 comments on commit b206d90

Please sign in to comment.