summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/tests/test_regression.py2
-rw-r--r--numpy/distutils/exec_command.py12
-rw-r--r--numpy/tests/test_matlib.py2
3 files changed, 6 insertions, 10 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 38ab56eb6..5d204617a 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -203,10 +203,8 @@ class TestRegression(TestCase):
d = buf[0]['data'][0]
buf[0]['head'] = h
buf[0]['data'][0] = d
- print buf[0]['head']
assert_(buf[0]['head'] == 1)
-
def test_mem_dot(self,level=rlevel):
"""Ticket #106"""
x = np.random.randn(0,1)
diff --git a/numpy/distutils/exec_command.py b/numpy/distutils/exec_command.py
index e0c3e1c97..7657b8735 100644
--- a/numpy/distutils/exec_command.py
+++ b/numpy/distutils/exec_command.py
@@ -194,7 +194,7 @@ def exec_command( command,
# _exec_command_posix uses os.system and is faster
# but not on all platforms os.system will return
# a correct status.
- if _with_python and (0 or sys.__stdout__.fileno()==-1):
+ if _with_python and sys.stdout.fileno() == -1:
st = _exec_command_python(command,
exec_command_dir = exec_dir,
**env)
@@ -348,12 +348,10 @@ def _exec_command( command, use_shell=None, use_tee = None, **env ):
argv = [os.environ['COMSPEC'],'/C'] + argv
using_command = 1
- # sys.__std*__ is used instead of sys.std* because environments
- # like IDLE, PyCrust, etc overwrite sys.std* commands.
- so_fileno = sys.__stdout__.fileno()
- se_fileno = sys.__stderr__.fileno()
- so_flush = sys.__stdout__.flush
- se_flush = sys.__stderr__.flush
+ so_fileno = sys.stdout.fileno()
+ se_fileno = sys.stderr.fileno()
+ so_flush = sys.stdout.flush
+ se_flush = sys.stderr.flush
so_dup = os.dup(so_fileno)
se_dup = os.dup(se_fileno)
diff --git a/numpy/tests/test_matlib.py b/numpy/tests/test_matlib.py
index 076676495..010aa8d84 100644
--- a/numpy/tests/test_matlib.py
+++ b/numpy/tests/test_matlib.py
@@ -1,6 +1,6 @@
import numpy as np
import numpy.matlib
-from numpy.testing import assert_array_equal, assert_
+from numpy.testing import assert_array_equal, assert_, run_module_suite
def test_empty():
x = np.matlib.empty((2,))