1
0
mirror of synced 2024-11-06 01:18:51 +01:00

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

View File

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