summaryrefslogtreecommitdiff
path: root/numpy/distutils/tests
diff options
context:
space:
mode:
authorOndrej Certik <ondrej.certik@gmail.com>2013-03-10 15:31:07 +0100
committerOndrej Certik <ondrej.certik@gmail.com>2013-03-10 15:31:07 +0100
commit5099683c351929e938985fd770b0a03cf7285ecb (patch)
treea2f69bc67962b59048ecf5cbb41bbef988fbf640 /numpy/distutils/tests
parent36c43214d25101c7acd63e0394877b5e04661639 (diff)
downloadnumpy-5099683c351929e938985fd770b0a03cf7285ecb.tar.gz
TST: skip general test on non-posix platforms
Add a comment explaining the issue.
Diffstat (limited to 'numpy/distutils/tests')
-rw-r--r--numpy/distutils/tests/test_exec_command.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/numpy/distutils/tests/test_exec_command.py b/numpy/distutils/tests/test_exec_command.py
index e9916039f..d23a4485a 100644
--- a/numpy/distutils/tests/test_exec_command.py
+++ b/numpy/distutils/tests/test_exec_command.py
@@ -52,16 +52,20 @@ def test_exec_command_stdout():
# method. This is tested here, with a do-nothing command that fails if the
# presence of fileno() is assumed in exec_command.
+ # The code has a special case for posix systems, so if we are on posix test
+ # both that the special case works and that the generic code works.
+
# Test posix version:
with redirect_stdout(StringIO.StringIO()):
with redirect_stderr(TemporaryFile()):
exec_command.exec_command("cd '.'")
- # Test non-posix version:
- with emulate_nonposix():
- with redirect_stdout(StringIO.StringIO()):
- with redirect_stderr(TemporaryFile()):
- exec_command.exec_command("cd '.'")
+ if os.name == 'posix':
+ # Test general (non-posix) version:
+ with emulate_nonposix():
+ with redirect_stdout(StringIO.StringIO()):
+ with redirect_stderr(TemporaryFile()):
+ exec_command.exec_command("cd '.'")
def test_exec_command_stderr():
# Test posix version:
@@ -69,8 +73,9 @@ def test_exec_command_stderr():
with redirect_stderr(StringIO.StringIO()):
exec_command.exec_command("cd '.'")
- # Test non-posix version:
- with emulate_nonposix():
- with redirect_stdout(TemporaryFile()):
- with redirect_stderr(StringIO.StringIO()):
- exec_command.exec_command("cd '.'")
+ if os.name == 'posix':
+ # Test general (non-posix) version:
+ with emulate_nonposix():
+ with redirect_stdout(TemporaryFile()):
+ with redirect_stderr(StringIO.StringIO()):
+ exec_command.exec_command("cd '.'")