1
0
Fork 0

Add a test for when main.py is called without any args

This commit is contained in:
jvoisin 2018-04-04 23:14:43 +02:00
parent 4ee091d833
commit d3b1eabe07
1 changed files with 5 additions and 0 deletions

View File

@ -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'],