@@ -55,12 +55,20 @@ cd python-common-expression-language
5555
5656# Install development dependencies
5757uv sync --dev
58+ # → Installing project dependencies and development tools
5859
5960# Build the Rust extension
6061uv run maturin develop
62+ # → 🔗 Found pyo3 bindings
63+ # → 📦 Built wheel for CPython 3.11 to target/wheels/common_expression_language-0.11.0-cp311-cp311-linux_x86_64.whl
64+ # → 📦 Installed common-expression-language-0.11.0
6165
6266# Run tests to verify setup
6367uv run pytest
68+ # → ========================= test session starts =========================
69+ # → collected 300+ items
70+ # → tests/test_basics.py ........ [ 95%]
71+ # → ========================= 300 passed in 2.34s =========================
6472```
6573
6674### Code Organization
@@ -87,15 +95,34 @@ We maintain comprehensive test coverage across multiple categories:
8795``` bash
8896# Run all tests
8997uv run pytest
98+ # → ========================= test session starts =========================
99+ # → collected 300+ items
100+ # → tests/test_basics.py ........ [ 95%]
101+ # → ========================= 300 passed in 2.34s =========================
90102
91103# Run specific test categories
92104uv run pytest tests/test_basics.py # Core functionality
105+ # → ========================= 25 passed in 0.12s =========================
106+
93107uv run pytest tests/test_arithmetic.py # Math operations
108+ # → ========================= 42 passed in 0.18s =========================
109+
94110uv run pytest tests/test_context.py # Variable handling
111+ # → ========================= 18 passed in 0.09s =========================
112+
95113uv run pytest tests/test_upstream_improvements.py # Future compatibility
114+ # → ========================= 15 passed, 8 xfailed in 0.15s =========================
96115
97116# Run with coverage
98117uv run pytest --cov=cel
118+ # → ========================= test session starts =========================
119+ # → ----------- coverage: platform linux, python 3.11.0-final-0 -----------
120+ # → Name Stmts Miss Cover
121+ # → ------------------------------------------
122+ # → cel/__init__.py 12 0 100%
123+ # → ------------------------------------------
124+ # → TOTAL 12 0 100%
125+ # → ========================= 300 passed in 3.45s =========================
99126```
100127
101128
@@ -123,11 +150,14 @@ def test_lower_ascii_not_implemented(self):
123150 """ When this test starts failing, lowerAscii() has been implemented."""
124151 with pytest.raises(RuntimeError , match = " Undefined variable or function.*lowerAscii" ):
125152 cel.evaluate(' "HELLO".lowerAscii()' )
153+ # → RuntimeError: Undefined variable or function 'lowerAscii'
126154
127155@pytest.mark.xfail (reason = " String utilities not implemented in cel v0.11.0" , strict = False )
128156def test_lower_ascii_expected_behavior (self ):
129157 """ This test will pass when upstream implements lowerAscii()."""
130- assert cel.evaluate(' "HELLO".lowerAscii()' ) == " hello"
158+ result = cel.evaluate(' "HELLO".lowerAscii()' )
159+ # → "hello" (when implemented)
160+ assert result == " hello"
131161```
132162
133163#### Monitored Categories
@@ -146,9 +176,15 @@ def test_lower_ascii_expected_behavior(self):
146176``` bash
147177# Check current upstream compatibility status
148178uv run pytest tests/test_upstream_improvements.py -v
179+ # → test_lower_ascii_not_implemented PASSED
180+ # → test_lower_ascii_expected_behavior XFAIL
181+ # → test_type_function_not_implemented PASSED
182+ # → test_type_function_expected_behavior XFAIL
183+ # → ========================= 15 passed, 8 xfailed in 0.15s =========================
149184
150185# Look for XPASS results indicating new capabilities
151186uv run pytest tests/test_upstream_improvements.py -v --tb=no | grep -E " (XPASS|FAILED)"
187+ # → (no output means no unexpected passes - all limitations still exist)
152188```
153189
154190** Interpreting Results:**
@@ -218,35 +254,60 @@ def add_function(self, name: str, func: Callable) -> None:
218254``` bash
219255# Clean rebuild
220256uv run maturin develop --release
257+ # → 🔗 Found pyo3 bindings
258+ # → 📦 Built wheel for CPython 3.11 to target/wheels/common_expression_language-0.11.0-cp311-cp311-linux_x86_64.whl
259+ # → 📦 Installed common-expression-language-0.11.0
221260
222261# Check Rust toolchain
223262rustc --version
263+ # → rustc 1.75.0 (82e1608df 2023-12-21)
264+
224265cargo --version
266+ # → cargo 1.75.0 (1d8b05cdd 2023-11-20)
225267```
226268
227269** Test Failures:**
228270``` bash
229271# Run with verbose output
230272uv run pytest tests/test_failing.py -v -s
273+ # → ========================= test session starts =========================
274+ # → tests/test_failing.py::test_function FAILED
275+ # → ===================== short test summary info =====================
276+ # → FAILED tests/test_failing.py::test_function - AssertionError: ...
231277
232278# Debug specific test
233279uv run pytest tests/test_file.py::test_name --pdb
280+ # → ========================= test session starts =========================
281+ # → >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
282+ # → (Pdb)
234283```
235284
236285** Type Conversion Issues:**
237286``` bash
238287# Check Python-Rust boundary
239288uv run pytest tests/test_types.py -v --tb=long
289+ # → ========================= test session starts =========================
290+ # → tests/test_types.py::test_string_conversion PASSED
291+ # → tests/test_types.py::test_int_conversion PASSED
292+ # → tests/test_types.py::test_list_conversion PASSED
293+ # → ========================= 25 passed in 0.12s =========================
240294```
241295
242296### Performance Profiling
243297
244298``` bash
245299# Basic performance verification
246300uv run pytest tests/test_performance_verification.py
301+ # → ========================= test session starts =========================
302+ # → tests/test_performance_verification.py::test_basic_performance PASSED
303+ # → tests/test_performance_verification.py::test_bulk_evaluations PASSED
304+ # → ========================= 5 passed in 0.45s =========================
247305
248306# Memory profiling (if needed)
249307uv run pytest --profile tests/test_performance.py
308+ # → ========================= test session starts =========================
309+ # → Profiling enabled, results saved to .pytest_cache/profiling/
310+ # → ========================= 12 passed in 1.23s =========================
250311```
251312
252313## Release Process
0 commit comments