File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import io
2+ import sys
3+
14from ..testcase import TestCase
25
36class TestHelp (TestCase ):
47
58 def test_get_function_list (self ):
6- h = self .geosupport .help ()
9+ h = self .geosupport .help (return_as_string = True )
710
811 self .assertTrue ("1" in h )
912 self .assertTrue ("bbl" in h )
1013
1114 def test_function_help (self ):
12- h = self .geosupport .help ("bbl" )
15+ h = self .geosupport .help ("bbl" , return_as_string = True )
1316
1417 self .assertTrue ("Function BL processes" in h )
1518 self .assertTrue ("Input: Borough" in h )
@@ -18,6 +21,17 @@ def test_function_help(self):
1821 self .assertTrue ("Mode Switch" in h )
1922
2023 def test_invalid_function_help (self ):
21- h = self .geosupport .help ("fake" )
24+ h = self .geosupport .help ("fake" , return_as_string = True )
2225
2326 self .assertEqual (h , "Function 'fake' does not exist." )
27+
28+ def test_print (self ):
29+ h = io .StringIO ()
30+ sys .stdout = h
31+
32+ o = self .geosupport .help ()
33+
34+ sys .stdout = sys .__stdout__
35+
36+ self .assertTrue ("bbl" in h .getvalue ())
37+ self .assertTrue (o is None )
You can’t perform that action at this time.
0 commit comments