summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Ottenklinger <magnus.ottenklinger@entelios.com>2015-06-11 16:40:37 +0200
committerMagnus Ottenklinger <magnus.ottenklinger@entelios.com>2015-06-11 16:47:49 +0200
commit25adc475278656e4c7d1c678b9d747cc8ffccef4 (patch)
tree17ef5db9e6c9faabd6e6105c62b9bd03682c8f64
parent4167fbe614f0b5c7662c4201c07a9432264e0838 (diff)
downloadunionfs-fuse-git-25adc475278656e4c7d1c678b9d747cc8ffccef4.tar.gz
check return code on unionfsctl
-rwxr-xr-xtest.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test.py b/test.py
index d900190..4ea0c80 100755
--- a/test.py
+++ b/test.py
@@ -251,10 +251,12 @@ class IOCTL_TestCase(Common, unittest.TestCase):
#enddef
def test_wrong_args(self):
- # TODO: also check the return code?
- with self.assertRaises(subprocess.CalledProcessError):
+ with self.assertRaises(subprocess.CalledProcessError) as contextmanager:
call('src/unionfsctl -xxxx 2>/dev/null')
#endwith
+ ex = contextmanager.exception
+ self.assertEqual(ex.returncode, 1)
+ self.assertEqual(ex.output, b'')
#enddef
#endclass