Skip to content

Commit ac68c47

Browse files
committed
Swaps to pytest unit testing compatability.
1 parent 68e2380 commit ac68c47

File tree

2 files changed

+275
-745
lines changed

2 files changed

+275
-745
lines changed

Makefile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ help:
99
@echo "Development:"
1010
@echo " install Install dependencies with uv"
1111
@echo " dev Install in development mode"
12-
@echo " test Run test suite"
12+
@echo " test Run full test suite"
13+
@echo " test-quick Run quick smoke tests"
14+
@echo " test-dom Run DOM manipulation tests"
15+
@echo " test-console Run console and JavaScript tests"
16+
@echo " test-network Run network monitoring tests"
1317
@echo " lint Run linting checks"
1418
@echo " format Format code with ruff"
1519
@echo " check Run all checks (lint + type check + test)"
@@ -26,7 +30,7 @@ install:
2630
uv sync
2731

2832
dev: install
29-
uv run mcp install devtools_server.py -n "Chrome DevTools MCP" --with-editable .
33+
uv run mcp install server.py -n "Chrome DevTools MCP" --with-editable .
3034

3135
# Code quality
3236
lint:
@@ -40,10 +44,19 @@ typecheck:
4044

4145
# Testing
4246
test:
43-
uv run python test_devtools_server.py
47+
uv run python -m pytest test_devtools_server.py -v
4448

45-
test-individual:
46-
uv run python run_tests.py start_and_connect
49+
test-quick:
50+
uv run python -m pytest test_devtools_server.py::test_chrome_detection test_devtools_server.py::test_javascript_execution -v
51+
52+
test-dom:
53+
uv run python -m pytest test_devtools_server.py -k "test_get_document or test_query_selector or test_element" -v
54+
55+
test-console:
56+
uv run python -m pytest test_devtools_server.py -k "test_javascript or test_console" -v
57+
58+
test-network:
59+
uv run python -m pytest test_devtools_server.py -k "test_network" -v
4760

4861
# All checks
4962
check: lint typecheck test
@@ -74,7 +87,7 @@ install-tools:
7487

7588
# Development server (for testing)
7689
dev-server:
77-
uv run python devtools_server.py
90+
uv run python server.py
7891

7992
# Version management
8093
version-patch:

0 commit comments

Comments
 (0)