Create a temporary JSONL file with sample data.
(temp_dir, sample_data_list)
| 105 | |
| 106 | @pytest.fixture |
| 107 | def temp_jsonl_file(temp_dir, sample_data_list): |
| 108 | """Create a temporary JSONL file with sample data.""" |
| 109 | filepath = os.path.join(temp_dir, "test_data.jsonl") |
| 110 | with open(filepath, "w", encoding="utf-8") as f: |
| 111 | for item in sample_data_list: |
| 112 | f.write(json.dumps(item, ensure_ascii=False) + "\n") |
| 113 | return filepath |
| 114 | |
| 115 | |
| 116 | @pytest.fixture |
nothing calls this directly
no outgoing calls
no test coverage detected