diff --git a/tests/highlevel/__init__.py b/tests/highlevel/__init__.py index 86da125b..1587cbc4 100644 --- a/tests/highlevel/__init__.py +++ b/tests/highlevel/__init__.py @@ -287,8 +287,8 @@ class PyDevdLifecycle(object): @contextlib.contextmanager def _wait_for_initialized(self): - with self._fix.expect_command(CMD_REDIRECT_OUTPUT): - with self._fix.expect_command(CMD_RUN): + with self._fix.wait_for_command(CMD_REDIRECT_OUTPUT): + with self._fix.wait_for_command(CMD_RUN): yield def _initialize(self): @@ -529,6 +529,13 @@ class PyDevdFixture(FixtureBase): if self._hidden: self.msgs.next_request() + @contextlib.contextmanager + def wait_for_command(self, cmdid, *args, **kwargs): + with self.fake.wait_for_command(cmdid, *args, **kwargs): + yield + if self._hidden: + self.msgs.next_request() + def set_response(self, cmdid, payload, **kwargs): self.fake.add_pending_response(cmdid, payload, **kwargs) if self._hidden: