Skip to content

Commit

Permalink
Revert "feat: make TimeoutError extend builtins.TimeoutError (#2297
Browse files Browse the repository at this point in the history
…)" (#2312)

This reverts commit 8cd06e5.
  • Loading branch information
mxschmitt committed Feb 20, 2024
1 parent 9625376 commit 516bdad
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ coverage.xml
junit/
htmldocs/
utils/docker/dist/
.venv/
Pipfile*
3 changes: 1 addition & 2 deletions playwright/_impl/_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# stable API.


from builtins import TimeoutError as TimeoutErrorBuiltin
from typing import Optional


Expand Down Expand Up @@ -44,7 +43,7 @@ def stack(self) -> Optional[str]:
return self._stack


class TimeoutError(Error, TimeoutErrorBuiltin):
class TimeoutError(Error):
pass


Expand Down
4 changes: 0 additions & 4 deletions tests/async/test_click.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import asyncio
import builtins
from typing import Optional

import pytest
Expand Down Expand Up @@ -639,9 +638,6 @@ async def test_timeout_waiting_for_hit_target(page: Page, server: Server) -> Non
assert "Timeout 5000ms exceeded." in error.message
assert '<div id="blocker"></div> intercepts pointer events' in error.message
assert "retrying click action" in error.message
assert isinstance(error, Error)
assert isinstance(error, TimeoutError)
assert isinstance(error, builtins.TimeoutError)


async def test_fail_when_obscured_and_not_waiting_for_hit_target(
Expand Down

0 comments on commit 516bdad

Please sign in to comment.