1
0
mirror of synced 2024-11-22 09:14:23 +01:00

Add a first test for the CLI

This commit is contained in:
jvoisin 2018-04-04 00:22:00 +02:00
parent e3a7c3b9c4
commit 6398befe14

10
tests/test_climat2.py Normal file
View File

@ -0,0 +1,10 @@
import unittest
import subprocess
import os
class TestHelp(unittest.TestCase):
def test_help(self):
proc = subprocess.Popen(['./main.py', '--help'], stdout=subprocess.PIPE)
stdout, _ = proc.communicate()
self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout)