Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions local-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ pre-commit==4.0.1
Django==4.2.24
pytest-xdist==3.8.0
pytest-asyncio==1.3.0
playwright>=1.60
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def pytest_configure(config: Any) -> None:

os.environ["PLAYWRIGHT_BROWSERS_PATH"] = playwright_browser_path

# Ensure subprocess pytester runs (and any child python processes) emit utf-8
# on stdout/stderr so pytester's utf-8 decoding doesn't break on Windows.
os.environ["PYTHONIOENCODING"] = "utf-8"


class HTTPTestServer:
PREFIX = ""
Expand Down
8 changes: 2 additions & 6 deletions tests/test_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,6 @@ def test_with_page(page):
]


@pytest.mark.skip(reason="requires 1.60")
def test_connect_options_should_work(testdir: pytest.Testdir) -> None:
server_process = None
try:
Expand All @@ -1056,7 +1055,7 @@ def test_connect_options_should_work(testdir: pytest.Testdir) -> None:
@pytest.fixture(scope="session")
def connect_options():
return {
"ws_endpoint": "ws://localhost:1234",
"endpoint": "ws://localhost:1234",
}
"""
)
Expand All @@ -1070,7 +1069,7 @@ async def test_connect_options(page):
"""
)
result = testdir.runpytest()
assert "connect ECONNREFUSED" in "".join(result.outlines)
assert "connect ECONNREFUSED" in "\n".join(result.outlines + result.errlines)
server_process = subprocess.Popen(
["playwright", "run-server", "--port=1234"],
stdout=subprocess.PIPE,
Expand Down Expand Up @@ -1111,7 +1110,6 @@ async def test_soft(page):
assert any("goodbye" in line for line in result.outlines)


@pytest.mark.skip(reason="requires 1.60")
def test_soft_assertion_multiple_failures_exception_group(
testdir: pytest.Testdir,
) -> None:
Expand All @@ -1133,7 +1131,6 @@ async def test_soft(page):
assert "first" in out and "second" in out


@pytest.mark.skip(reason="requires 1.60")
def test_soft_assertion_passes_when_all_match(testdir: pytest.Testdir) -> None:
testdir.makepyfile(
"""
Expand All @@ -1150,7 +1147,6 @@ async def test_soft(page):
result.assert_outcomes(passed=1)


@pytest.mark.skip(reason="requires 1.60")
def test_soft_assertion_does_not_shadow_body_failure(
testdir: pytest.Testdir,
) -> None:
Expand Down
8 changes: 2 additions & 6 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,6 @@ def test_with_page(page):
]


@pytest.mark.skip(reason="requires 1.60")
def test_connect_options_should_work(testdir: pytest.Testdir) -> None:
server_process = None
try:
Expand All @@ -1046,7 +1045,7 @@ def test_connect_options_should_work(testdir: pytest.Testdir) -> None:
@pytest.fixture(scope="session")
def connect_options():
return {
"ws_endpoint": "ws://localhost:1234",
"endpoint": "ws://localhost:1234",
}
"""
)
Expand All @@ -1057,7 +1056,7 @@ def test_connect_options(page):
"""
)
result = testdir.runpytest()
assert "connect ECONNREFUSED" in "".join(result.outlines)
assert "connect ECONNREFUSED" in "\n".join(result.outlines + result.errlines)
server_process = subprocess.Popen(
["playwright", "run-server", "--port=1234"],
stdout=subprocess.PIPE,
Expand Down Expand Up @@ -1095,7 +1094,6 @@ def test_soft(page):
assert any("goodbye" in line for line in result.outlines)


@pytest.mark.skip(reason="requires 1.60")
def test_soft_assertion_multiple_failures_exception_group(
testdir: pytest.Testdir,
) -> None:
Expand All @@ -1115,7 +1113,6 @@ def test_soft(page):
assert "first" in out and "second" in out


@pytest.mark.skip(reason="requires 1.60")
def test_soft_assertion_passes_when_all_match(testdir: pytest.Testdir) -> None:
testdir.makepyfile(
"""
Expand All @@ -1130,7 +1127,6 @@ def test_soft(page):
result.assert_outcomes(passed=1)


@pytest.mark.skip(reason="requires 1.60")
def test_soft_assertion_does_not_shadow_body_failure(
testdir: pytest.Testdir,
) -> None:
Expand Down
Loading