Skip to content

Commit 4fd70eb

Browse files
committed
style
1 parent 0aae8f2 commit 4fd70eb

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/unit/test_files_checks.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,12 @@ def test_check_jsonl_inconsistent_dataset_format(tmp_path: Path):
182182
# Create a JSONL file with inconsistent dataset formats
183183
file = tmp_path / "inconsistent_format.jsonl"
184184
content = [
185-
{"messages": [{"role": "user", "content": "Hi"}, {"role": "assistant", "content": "Hi! How can I help you?"}]},
185+
{
186+
"messages": [
187+
{"role": "user", "content": "Hi"},
188+
{"role": "assistant", "content": "Hi! How can I help you?"},
189+
]
190+
},
186191
{"text": "How are you?"}, # Missing 'messages'
187192
]
188193
with file.open("w") as f:
@@ -240,7 +245,10 @@ def test_check_jsonl_non_alternating_roles(tmp_path: Path):
240245
report = check_file(file)
241246

242247
assert not report["is_check_passed"]
243-
assert "At least one message with the assistant role must be present" in report["message"]
248+
assert (
249+
"At least one message with the assistant role must be present"
250+
in report["message"]
251+
)
244252

245253

246254
def test_check_jsonl_invalid_value_type(tmp_path: Path):

0 commit comments

Comments
 (0)