mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Skip certain test because of cmd limitations
This commit is contained in:
parent
991fede562
commit
5a78750119
2 changed files with 16 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ class BackChannel(object):
|
|||
self._server_socket = sockets.create_server("127.0.0.1", 0, self.TIMEOUT)
|
||||
_, self.port = sockets.get_address(self._server_socket)
|
||||
self._server_socket.listen(0)
|
||||
log.info("{0} created server socket on port {1}", self, self.port)
|
||||
|
||||
def accept_worker():
|
||||
log.info(
|
||||
|
|
@ -67,8 +68,14 @@ class BackChannel(object):
|
|||
self._established.set()
|
||||
|
||||
def receive(self):
|
||||
self._established.wait()
|
||||
return self._stream.read_json()
|
||||
log.info("{0} waiting for connection to be established...", self)
|
||||
if not self._established.wait(timeout=self.TIMEOUT):
|
||||
log.error("{0} timed out waiting for connection after {1} seconds", self, self.TIMEOUT)
|
||||
raise TimeoutError(f"{self} timed out waiting for debuggee to connect")
|
||||
log.info("{0} connection established, reading JSON...", self)
|
||||
result = self._stream.read_json()
|
||||
log.info("{0} received: {1}", self, result)
|
||||
return result
|
||||
|
||||
def send(self, value):
|
||||
self.session.timeline.unfreeze()
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@ def test_args(pyfile, target, run):
|
|||
def test_shell_expansion(pyfile, tmpdir, target, run, expansion, python_with_space):
|
||||
if expansion == "expand" and run.console == "internalConsole":
|
||||
pytest.skip('Shell expansion is not supported for "internalConsole"')
|
||||
|
||||
# Skip tests with python_with_space=True and target="code" on Windows with runInTerminal
|
||||
# because cmd.exe cannot properly handle multiline string arguments when invoking a .cmd wrapper
|
||||
if (python_with_space and target == targets.Code and
|
||||
run.console in ("integratedTerminal", "externalTerminal") and
|
||||
sys.platform == "win32"):
|
||||
pytest.skip('Windows cmd.exe cannot handle multiline code arguments with .cmd wrapper')
|
||||
|
||||
@pyfile
|
||||
def code_to_debug():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue