Skip to content

Commit 73f8fab

Browse files
mattdawkinsclaude
andcommitted
Fix CI test failures by reverting incorrect test data changes
The Python server viame parser does not support parsing notes from VIAME CSV files (unlike the TypeScript client parser). The original test data without notes in expected output was correct. This reverts debug code and incorrect notes additions to viame.spec.json. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent dd2efd7 commit 73f8fab

3 files changed

Lines changed: 3 additions & 43 deletions

File tree

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
11
import json
2-
import os
32
from typing import Dict, List
43

54
import pytest
65

76
from dive_utils.serializers import viame
87

9-
# Load test data and verify notes are present
10-
_test_file_path = os.path.abspath('../testutils/viame.spec.json')
11-
128
with open('../testutils/viame.spec.json', 'r') as fp:
139
test_tuple = json.load(fp)
1410

15-
# Store a copy of the original expected data for comparison
16-
_original_test_1_expected = json.dumps(test_tuple[1][1]) if len(test_tuple) > 1 else None
17-
18-
# Verify that test case 1 (index 1) has the expected notes field at import time
19-
if len(test_tuple) > 1:
20-
features = test_tuple[1][1].get('0', {}).get('features', [])
21-
has_notes = any('notes' in f for f in features)
22-
if not has_notes:
23-
raise AssertionError(
24-
f"NOTES FIELD MISSING FROM TEST DATA AT IMPORT TIME!\n"
25-
f"CWD: {os.getcwd()}\n"
26-
f"Test file path: {_test_file_path}\n"
27-
f"Test case 1 track 0 features: {json.dumps(features)}"
28-
)
29-
3011

3112
@pytest.mark.parametrize("input,expected_tracks,expected_attributes", test_tuple)
3213
def test_read_viame_csv(
@@ -36,27 +17,8 @@ def test_read_viame_csv(
3617
):
3718
(converted, attributes, warnings, fps) = viame.load_csv_as_tracks_and_attributes(input)
3819

39-
# Debug: Check if this is the problematic test case (has notes in input)
40-
if any("(note)" in line for line in input):
41-
features = expected_tracks.get('0', {}).get('features', [])
42-
current_expected = json.dumps(expected_tracks)
43-
has_notes = any('notes' in f for f in features)
44-
assert has_notes, (
45-
f"NOTES MISSING IN expected_tracks!\n"
46-
f"Input: {input}\n"
47-
f"Expected features: {json.dumps(features)}\n"
48-
f"Original test_tuple[1][1] (at import): {_original_test_1_expected}\n"
49-
f"Current expected_tracks: {current_expected}\n"
50-
f"Are they equal: {_original_test_1_expected == current_expected}"
51-
)
52-
5320
converted_json = json.dumps(converted['tracks'], sort_keys=True)
5421
expected_json = json.dumps(expected_tracks, sort_keys=True)
5522

56-
if converted_json != expected_json:
57-
# Show the full comparison for debugging
58-
print(f"CONVERTED: {converted_json}")
59-
print(f"EXPECTED: {expected_json}")
60-
6123
assert converted_json == expected_json
6224
assert json.dumps(attributes, sort_keys=True) == json.dumps(expected_attributes, sort_keys=True)

server/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ deps =
4444
pytest
4545
pytest-ordering
4646
commands =
47-
pytest tests -m "not integration" -s {posargs}
47+
pytest tests -m "not integration" {posargs}
4848

4949
[testenv:testintegration]
5050
passenv = GIRDER_API_KEY

testutils/viame.spec.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,7 @@
367367
222,
368368
3333,
369369
444
370-
],
371-
"notes": ["note"]
370+
]
372371
},
373372
{
374373
"frame": 2,
@@ -377,8 +376,7 @@
377376
457,
378377
1039,
379378
633
380-
],
381-
"notes": ["note", "note2"]
379+
]
382380
}
383381
],
384382
"begin": 0,

0 commit comments

Comments
 (0)