From d3b1eabe075e5f972c85979e6da4630be2c15a83 Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Wed, 4 Apr 2018 23:14:43 +0200
Subject: [PATCH] Add a test for when main.py is called without any args

---
 tests/test_climat2.py | 5 +++++
 1 file changed, 5 insertions(+)

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):
         stdout, _ = proc.communicate()
         self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout)
 
+    def test_no_arg(self):
+        proc = subprocess.Popen(['./main.py'], stdout=subprocess.PIPE)
+        stdout, _ = proc.communicate()
+        self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout)
+
 class TestGetMeta(unittest.TestCase):
     def test_pdf(self):
         proc = subprocess.Popen(['./main.py', '--show', './tests/data/dirty.pdf'],
-- 
GitLab