Add a first test for the CLI
This commit is contained in:
parent
e3a7c3b9c4
commit
6398befe14
10
tests/test_climat2.py
Normal file
10
tests/test_climat2.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user