Add a test for when main.py is called without any args
This commit is contained in:
parent
4ee091d833
commit
d3b1eabe07
@ -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'],
|
||||||
|
Loading…
Reference in New Issue
Block a user