summaryrefslogtreecommitdiff
path: root/tests/test_climat2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_climat2.py')
-rw-r--r--tests/test_climat2.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_climat2.py b/tests/test_climat2.py
index 0536646..bc4a175 100644
--- a/tests/test_climat2.py
+++ b/tests/test_climat2.py
@@ -16,6 +16,22 @@ class TestHelp(unittest.TestCase):
16 self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [-L] [files [files ...]]', stdout) 16 self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [-L] [files [files ...]]', stdout)
17 17
18 18
19class TestReturnValue(unittest.TestCase):
20 def test_nonzero(self):
21 ret = subprocess.call(['./main.py', './main.py'], stdout=subprocess.DEVNULL)
22 self.assertEqual(255, ret)
23
24 ret = subprocess.call(['./main.py', '--whololo'], stderr=subprocess.DEVNULL)
25 self.assertEqual(2, ret)
26
27 def test_zero(self):
28 ret = subprocess.call(['./main.py'], stdout=subprocess.DEVNULL)
29 self.assertEqual(0, ret)
30
31 ret = subprocess.call(['./main.py', '--show', './main.py'], stdout=subprocess.DEVNULL)
32 self.assertEqual(0, ret)
33
34
19class TestCleanMeta(unittest.TestCase): 35class TestCleanMeta(unittest.TestCase):
20 def test_jpg(self): 36 def test_jpg(self):
21 shutil.copy('./tests/data/dirty.jpg', './tests/data/clean.jpg') 37 shutil.copy('./tests/data/dirty.jpg', './tests/data/clean.jpg')