diff options
author | Lucas Wiman <lucaswiman@counsyl.com> | 2017-01-02 18:52:00 -0800 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2017-02-28 21:37:12 -0800 |
commit | e05c7253043647e37bdbc13038bff06334fac8cb (patch) | |
tree | b121782e824aa5cccca7f5c67066dea401388320 /test_six.py | |
parent | 4141a3ed0a51abb85236a0e1bba4965b6df7aebf (diff) | |
download | six-git-e05c7253043647e37bdbc13038bff06334fac8cb.tar.gz |
Add moves for getoutput and getstatusoutput.
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py index b8543a9..a6875c6 100644 --- a/test_six.py +++ b/test_six.py @@ -232,6 +232,19 @@ def test_map(): assert six.advance_iterator(map(lambda x: x + 1, range(2))) == 1 +def test_getoutput(): + from six.moves import getoutput + output = getoutput('echo "foo"') + assert output == 'foo' + + +def test_getstatusoutput(): + from six.moves import getstatusoutput + status, output = getstatusoutput('echo "foo"') + assert status == 0 + assert output == 'foo' + + def test_zip(): from six.moves import zip assert six.advance_iterator(zip(range(2), range(2))) == (0, 0) |