Fix length of the line

This commit is contained in:
Adonai Vera 2024-02-01 18:07:24 -05:00
parent aba5c0a07b
commit e899b428ca
2 changed files with 10 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import csv
import os
from typing import Any, Dict, List, Optional
from supervision.detection.core import Detections
BASE_HEADER = [

View File

@ -1,4 +1,5 @@
import csv
import os
from test.test_utils import mock_detections
from typing import Any, Dict, List
@ -8,7 +9,9 @@ import supervision as sv
@pytest.mark.parametrize(
"detections, custom_data, second_detections, second_custom_data, file_name, expected_result",
"detections, custom_data, "
"second_detections, second_custom_data, "
"file_name, expected_result",
[
(
mock_detections(
@ -187,6 +190,7 @@ import supervision as sv
), # Complex Data
],
)
def test_csv_sink(
detections: mock_detections,
custom_data: Dict[str, Any],
@ -203,7 +207,9 @@ def test_csv_sink(
@pytest.mark.parametrize(
"detections, custom_data, second_detections, second_custom_data, file_name, expected_result",
"detections, custom_data, "
"second_detections, second_custom_data, "
"file_name, expected_result",
[
(
mock_detections(
@ -382,6 +388,7 @@ def test_csv_sink(
), # Complex Data
],
)
def test_csv_sink_manual(
detections: mock_detections,
custom_data: Dict[str, Any],
@ -407,4 +414,4 @@ def assert_csv_equal(file_name, expected_rows):
[str(item) for item in expected_rows[i]] == row
), f"Row in CSV didn't match expected output: {row} != {expected_rows[i]}"
# os.remove(file_name)
os.remove(file_name)