forked from Rust-related/RustPython
Get regrtests working on Windows
This commit is contained in:
7
Lib/platform.py
vendored
7
Lib/platform.py
vendored
@@ -281,9 +281,10 @@ def _syscmd_ver(system='', release='', version='',
|
||||
for cmd in ('ver', 'command /c ver', 'cmd /c ver'):
|
||||
try:
|
||||
info = subprocess.check_output(cmd,
|
||||
stderr=subprocess.DEVNULL,
|
||||
text=True,
|
||||
shell=True)
|
||||
stderr=subprocess.DEVNULL,)
|
||||
# XXX RustPython TODO: more Popen args
|
||||
# text=True,
|
||||
# shell=True)
|
||||
except (OSError, subprocess.CalledProcessError) as why:
|
||||
#print('Command %s failed: %s' % (cmd, why))
|
||||
continue
|
||||
|
||||
@@ -67,7 +67,7 @@ class CommonTest(seq_tests.CommonTest):
|
||||
self.assertEqual(repr(a2), "[0, 1, 2, [...], 3]")
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
@unittest.skip("TODO: RUSTPYTHON")
|
||||
def test_repr_deep(self):
|
||||
a = self.type2test([])
|
||||
for i in range(sys.getrecursionlimit() + 100):
|
||||
|
||||
@@ -558,7 +558,7 @@ class DictTest(unittest.TestCase):
|
||||
self.assertRaises(Exc, repr, d)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
@unittest.skip("TODO: RUSTPYTHON")
|
||||
def test_repr_deep(self):
|
||||
d = {}
|
||||
for i in range(sys.getrecursionlimit() + 100):
|
||||
|
||||
@@ -248,6 +248,7 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
|
||||
|
||||
let subprocess_error = ctx.new_class("SubprocessError", ctx.exceptions.exception_type.clone());
|
||||
let timeout_expired = ctx.new_class("TimeoutExpired", subprocess_error.clone());
|
||||
let called_process_error = ctx.new_class("CalledProcessError", subprocess_error.clone());
|
||||
|
||||
let popen = py_class!(ctx, "Popen", ctx.object(), {
|
||||
(slot new) => PopenRef::new,
|
||||
@@ -270,6 +271,7 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
|
||||
"Popen" => popen,
|
||||
"SubprocessError" => subprocess_error,
|
||||
"TimeoutExpired" => timeout_expired,
|
||||
"CalledProcessError" => called_process_error,
|
||||
"PIPE" => ctx.new_int(-1),
|
||||
"STDOUT" => ctx.new_int(-2),
|
||||
"DEVNULL" => ctx.new_int(-3),
|
||||
|
||||
Reference in New Issue
Block a user