diff options
author | Magnus Ottenklinger <magnus.ottenklinger@entelios.com> | 2015-06-11 16:40:37 +0200 |
---|---|---|
committer | Magnus Ottenklinger <magnus.ottenklinger@entelios.com> | 2015-06-11 16:47:49 +0200 |
commit | 25adc475278656e4c7d1c678b9d747cc8ffccef4 (patch) | |
tree | 17ef5db9e6c9faabd6e6105c62b9bd03682c8f64 | |
parent | 4167fbe614f0b5c7662c4201c07a9432264e0838 (diff) | |
download | unionfs-fuse-git-25adc475278656e4c7d1c678b9d747cc8ffccef4.tar.gz |
check return code on unionfsctl
-rwxr-xr-x | test.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |