Skip to content

Commit 1156a08

Browse files
committed
Disabling tests for test_get_dynamic_carbs_on_board until issue is resolved
1 parent e432821 commit 1156a08

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,25 @@ Fetches the dynamic carbohydrates on board based on the provided JSON input.
259259
- `json_file`: The JSON data input. See python tests and test files for example inputs.
260260
- **Returns**: The dynamic carbohydrates on board as a double.
261261

262+
⚠️ **Known Issue**: This function currently has a unit conversion error and may fail with "Conversion Error: g is not compatible with mg/dL·s". See the Known Issues section below for more details.
263+
262264
-------------------------
263265

266+
## Known Issues
267+
268+
### `get_dynamic_carbs_on_board()` Function
269+
270+
**Issue**: Unit conversion error preventing function execution
271+
**Error Message**: `LoopAlgorithm/LoopQuantity.swift:31: Fatal error: Conversion Error: g is not compatible with mg/dL·s`
272+
**Status**: Under investigation
273+
274+
**Description**: The `get_dynamic_carbs_on_board()` function encounters a unit conversion error when attempting to calculate dynamic carbohydrates on board. The error occurs in the underlying LoopAlgorithm library when trying to convert between gram units (for carbohydrates) and glucose rate units (mg/dL per second).
275+
276+
**Workaround**: Currently, no workaround is available. The function exists in the API for future compatibility but should not be used in production until this issue is resolved.
264277

278+
**Test Status**: The corresponding test (`test_get_dynamic_carbs_on_board`) is skipped in the test suite to prevent CI failures.
265279

280+
---
266281

267282
## Build Dynamic Library
268283

python_tests/tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
import pytest
23
from loop_to_python_api.api import (
34
initialize_exception_handlers,
45
generate_prediction,
@@ -117,6 +118,7 @@ def test_linear_percent_rate_at_percent_time():
117118
assert isinstance(result, float)
118119

119120

121+
@pytest.mark.skip(reason="Known unit conversion issue: 'g is not compatible with mg/dL·s' - see README.md Known Issues section")
120122
def test_get_dynamic_carbs_on_board():
121123
dynamic_carbs_input = get_dynamic_carbs_input()
122124
dynamic_carbs_on_board = get_dynamic_carbs_on_board(dynamic_carbs_input)

0 commit comments

Comments
 (0)