diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-05-25 09:44:36 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-05-25 09:44:36 (GMT) |
commit | a7514993637aa2f2514fd7e5ab195088efa31482 (patch) | |
tree | 617c8e19f0902e97f4ccaaff8a4affd59c03eef5 /Lib/test/test_sysconfig.py | |
parent | 4fb18010f5e16533feb7d3e88d8c11ec522cc98b (diff) | |
download | cpython-a7514993637aa2f2514fd7e5ab195088efa31482.zip cpython-a7514993637aa2f2514fd7e5ab195088efa31482.tar.gz cpython-a7514993637aa2f2514fd7e5ab195088efa31482.tar.bz2 |
Made sysconfig a script that displays useful information - #8770
Diffstat (limited to 'Lib/test/test_sysconfig.py')
-rw-r--r-- | Lib/test/test_sysconfig.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 968f3de..f4a3c8e 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -11,13 +11,14 @@ import subprocess import shutil from copy import copy, deepcopy -from test.support import run_unittest, TESTFN, unlink, get_attribute +from test.support import (run_unittest, TESTFN, unlink, get_attribute, + captured_stdout) import sysconfig from sysconfig import (get_paths, get_platform, get_config_vars, get_path, get_path_names, _INSTALL_SCHEMES, _get_default_scheme, _expand_vars, - get_scheme_names, get_config_var) + get_scheme_names, get_config_var, _main) class TestSysConfig(unittest.TestCase): @@ -264,6 +265,13 @@ class TestSysConfig(unittest.TestCase): user_path = get_path(name, 'posix_user') self.assertEquals(user_path, global_path.replace(base, user)) + def test_main(self): + # just making sure _main() runs and returns things in the stdout + with captured_stdout() as output: + _main() + self.assertTrue(len(output.getvalue().split('\n')) > 0) + + def test_main(): run_unittest(TestSysConfig) |