diff options
| author | jvoisin | 2018-04-04 00:22:00 +0200 |
|---|---|---|
| committer | jvoisin | 2018-04-04 00:22:00 +0200 |
| commit | 6398befe1417be97b4b53ea5b53134f3ed09faeb (patch) | |
| tree | 77c88a1f04c1fda928d584bbf0cb1dde4b30e2cd | |
| parent | e3a7c3b9c4d2f966bd560529e89db4e16b8403d5 (diff) | |
Add a first test for the CLI
| -rw-r--r-- | tests/test_climat2.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_climat2.py b/tests/test_climat2.py new file mode 100644 index 0000000..a0bcafc --- /dev/null +++ b/tests/test_climat2.py | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | import unittest | ||
| 2 | import subprocess | ||
| 3 | import os | ||
| 4 | |||
| 5 | |||
| 6 | class TestHelp(unittest.TestCase): | ||
| 7 | def test_help(self): | ||
| 8 | proc = subprocess.Popen(['./main.py', '--help'], stdout=subprocess.PIPE) | ||
| 9 | stdout, _ = proc.communicate() | ||
| 10 | self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout) | ||
