提交 890fdaa1 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Always call Python, as needed on Windows.

上级 aeabbc88
...@@ -91,8 +91,11 @@ def run(stdout, stderr, argv, theano_nose, batch_size): ...@@ -91,8 +91,11 @@ def run(stdout, stderr, argv, theano_nose, batch_size):
stdout.flush() stdout.flush()
stderr.flush() stderr.flush()
dummy_in = open(os.devnull) dummy_in = open(os.devnull)
# We need to call 'python' on Windows, because theano-nose is not a
# native Windows app; and it does not hurt to call it on Unix.
rval = subprocess.call( rval = subprocess.call(
[theano_nose, '--collect-only', '--with-id'] + other_args, (['python', theano_nose, '--collect-only', '--with-id']
+ other_args),
stdin=dummy_in.fileno(), stdin=dummy_in.fileno(),
stdout=stdout.fileno(), stdout=stdout.fileno(),
stderr=stderr.fileno()) stderr=stderr.fileno())
...@@ -118,7 +121,7 @@ def run(stdout, stderr, argv, theano_nose, batch_size): ...@@ -118,7 +121,7 @@ def run(stdout, stderr, argv, theano_nose, batch_size):
# failed tests, which are re-run (with output) below. # failed tests, which are re-run (with output) below.
dummy_out = open(os.devnull, 'w') dummy_out = open(os.devnull, 'w')
rval = subprocess.call( rval = subprocess.call(
([theano_nose, '-q', '--with-id'] (['python', theano_nose, '-q', '--with-id']
+ map(str, test_range) + map(str, test_range)
+ other_args), + other_args),
stdout=dummy_out.fileno(), stdout=dummy_out.fileno(),
...@@ -142,7 +145,9 @@ def run(stdout, stderr, argv, theano_nose, batch_size): ...@@ -142,7 +145,9 @@ def run(stdout, stderr, argv, theano_nose, batch_size):
stdout.flush() stdout.flush()
stderr.flush() stderr.flush()
subprocess.call( subprocess.call(
[theano_nose, '-v', '--with-id'] + failed + other_args, (['python', theano_nose, '-v', '--with-id']
+ failed
+ other_args),
stdin=dummy_in.fileno(), stdin=dummy_in.fileno(),
stdout=stdout.fileno(), stdout=stdout.fileno(),
stderr=stderr.fileno()) stderr=stderr.fileno())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论