forked from git-cola/git-cola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_test.py
30 lines (20 loc) · 792 Bytes
/
app_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
from __future__ import absolute_import, division, unicode_literals
import argparse
import unittest
from cola import app
from .helper import run_unittest
class AppTestCase(unittest.TestCase):
def test_setup_environment(self):
# If the function doesn't throw an exception we are happy.
self.assertTrue(hasattr(app, 'setup_environment'))
app.setup_environment()
def test_add_common_arguments(self):
# If the function doesn't throw an exception we are happy.
parser = argparse.ArgumentParser()
self.assertTrue(hasattr(app, 'add_common_arguments'))
app.add_common_arguments(parser)
def test_suite():
return unittest.makeSuite(AppTestCase)
if __name__ == "__main__":
run_unittest(test_suite())