comparison tests/test_console_scripts.py @ 0:5dba84370182

initial commit; half-working prototype
author Jeff Hammel <k0scist@gmail.com>
date Sat, 24 Jun 2017 12:03:39 -0700
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5dba84370182
1 #!/usr/bin/env python
2
3 """
4 test console scripts
5 """
6
7 import os
8 import subprocess
9 import unittest
10 from globalneighbors import main
11
12 here = os.path.dirname(os.path.abspath(__file__))
13 data = os.path.join(here, 'data')
14
15
16 class TestConsoleScripts(unittest.TestCase):
17
18 # path to full data
19 full_tsv = os.path.join(data, 'cities1000.txt')
20
21 def test_main(self):
22 """test main API"""
23
24 assert os.path.exists(self.full_tsv)
25 main.main(args=[self.full_tsv])
26
27 def test_subprocess(self):
28 """
29 test invoking `global-neighbors`
30 as a subprocess
31 """
32 # TODO
33
34
35 if __name__ == '__main__':
36 unittest.main()