browser-use--browser-harness
cae52ce916
Moves all root-level test_*.py files into a structured tests/ directory: - tests/unit/ — admin, helpers (was test_screenshot), run - tests/integration/ — js expression tests - tests/conftest.py — shared fake_png pytest fixture, eliminating duplication Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
17 行
293 B
Python
17 行
293 B
Python
import base64
|
|
import io
|
|
|
|
import pytest
|
|
from PIL import Image
|
|
|
|
|
|
def make_png(width, height):
|
|
buf = io.BytesIO()
|
|
Image.new("RGB", (width, height), "white").save(buf, format="PNG")
|
|
return base64.b64encode(buf.getvalue()).decode()
|
|
|
|
|
|
@pytest.fixture
|
|
def fake_png():
|
|
return make_png
|