Show More
@@ -0,0 +1,17 | |||||
|
1 | # coding: utf-8 | |||
|
2 | """Test suite for our sysinfo utilities.""" | |||
|
3 | ||||
|
4 | # Copyright (c) IPython Development Team. | |||
|
5 | # Distributed under the terms of the Modified BSD License. | |||
|
6 | ||||
|
7 | import json | |||
|
8 | import nose.tools as nt | |||
|
9 | ||||
|
10 | from IPython.utils import sysinfo | |||
|
11 | ||||
|
12 | ||||
|
13 | def test_json_getsysinfo(): | |||
|
14 | """ | |||
|
15 | test that it is easily jsonable and don't return bytes somewhere. | |||
|
16 | """ | |||
|
17 | json.dumps(sysinfo.get_sys_info()) |
@@ -362,9 +362,6 Currently the magic system has the following functions:""", | |||||
362 | Proper color support under MS Windows requires the pyreadline library. |
|
362 | Proper color support under MS Windows requires the pyreadline library. | |
363 | You can find it at: |
|
363 | You can find it at: | |
364 | http://ipython.org/pyreadline.html |
|
364 | http://ipython.org/pyreadline.html | |
365 | Gary's readline needs the ctypes module, from: |
|
|||
366 | http://starship.python.net/crew/theller/ctypes |
|
|||
367 | (Note that ctypes is already part of Python versions 2.5 and newer). |
|
|||
368 |
|
365 | |||
369 | Defaulting color scheme to 'NoColor'""" |
|
366 | Defaulting color scheme to 'NoColor'""" | |
370 | new_scheme = 'NoColor' |
|
367 | new_scheme = 'NoColor' |
@@ -61,8 +61,8 def pkg_commit_hash(pkg_path): | |||||
61 | cwd=pkg_path, shell=True) |
|
61 | cwd=pkg_path, shell=True) | |
62 | repo_commit, _ = proc.communicate() |
|
62 | repo_commit, _ = proc.communicate() | |
63 | if repo_commit: |
|
63 | if repo_commit: | |
64 | return 'repository', repo_commit.strip() |
|
64 | return 'repository', repo_commit.strip().decode('ascii') | |
65 | return '(none found)', '<not found>' |
|
65 | return '(none found)', u'<not found>' | |
66 |
|
66 | |||
67 |
|
67 | |||
68 | def pkg_info(pkg_path): |
|
68 | def pkg_info(pkg_path): | |
@@ -152,10 +152,7 def num_cpus(): | |||||
152 |
|
152 | |||
153 | ncpufuncs = {'Linux':_num_cpus_unix, |
|
153 | ncpufuncs = {'Linux':_num_cpus_unix, | |
154 | 'Darwin':_num_cpus_darwin, |
|
154 | 'Darwin':_num_cpus_darwin, | |
155 |
'Windows':_num_cpus_windows |
|
155 | 'Windows':_num_cpus_windows | |
156 | # On Vista, python < 2.5.2 has a bug and returns 'Microsoft' |
|
|||
157 | # See http://bugs.python.org/issue1082 for details. |
|
|||
158 | 'Microsoft':_num_cpus_windows, |
|
|||
159 | } |
|
156 | } | |
160 |
|
157 | |||
161 | ncpufunc = ncpufuncs.get(platform.system(), |
|
158 | ncpufunc = ncpufuncs.get(platform.system(), |
@@ -579,7 +579,7 def git_prebuild(pkg_dir, build_cmd=build_py): | |||||
579 | with open(out_pth, 'w') as out_file: |
|
579 | with open(out_pth, 'w') as out_file: | |
580 | out_file.writelines([ |
|
580 | out_file.writelines([ | |
581 | '# GENERATED BY setup.py\n', |
|
581 | '# GENERATED BY setup.py\n', | |
582 | 'commit = "%s"\n' % repo_commit, |
|
582 | 'commit = u"%s"\n' % repo_commit, | |
583 | ]) |
|
583 | ]) | |
584 | return require_submodules(MyBuildPy) |
|
584 | return require_submodules(MyBuildPy) | |
585 |
|
585 |
General Comments 0
You need to be logged in to leave comments.
Login now