summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2018-04-04 23:14:43 +0200
committerjvoisin2018-04-04 23:14:43 +0200
commitd3b1eabe075e5f972c85979e6da4630be2c15a83 (patch)
tree97ca7a6d56bd3911e882bf56d468fb8120e9c86c
parent4ee091d833b55932fec345cc7403ef3723ecbd2f (diff)
Add a test for when main.py is called without any args
-rw-r--r--tests/test_climat2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_climat2.py b/tests/test_climat2.py
index cf7a63b..31827f7 100644
--- a/tests/test_climat2.py
+++ b/tests/test_climat2.py
@@ -9,6 +9,11 @@ class TestHelp(unittest.TestCase):
9 stdout, _ = proc.communicate() 9 stdout, _ = proc.communicate()
10 self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout) 10 self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout)
11 11
12 def test_no_arg(self):
13 proc = subprocess.Popen(['./main.py'], stdout=subprocess.PIPE)
14 stdout, _ = proc.communicate()
15 self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout)
16
12class TestGetMeta(unittest.TestCase): 17class TestGetMeta(unittest.TestCase):
13 def test_pdf(self): 18 def test_pdf(self):
14 proc = subprocess.Popen(['./main.py', '--show', './tests/data/dirty.pdf'], 19 proc = subprocess.Popen(['./main.py', '--show', './tests/data/dirty.pdf'],