Skip to content

Commit dd77ff9

Browse files
Remove package from tests
1 parent d980239 commit dd77ff9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/test_tts_sdp_end_to_end.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import pytest
2-
import ndjson
32
import boto3
43
import json
54
import os
65
import tarfile
76
from pathlib import Path
87
from omegaconf import OmegaConf
98
from sdp.run_processors import run_processors
9+
from sdp.utils.common import load_manifest
1010

1111
DATASET_CONFIGS_ROOT = Path(__file__).parents[1] / "dataset_configs"
1212

@@ -68,16 +68,14 @@ def test_tts_sdp_end_to_end(get_tts_ytc_data):
6868

6969
assert os.path.exists(cfg.final_manifest)
7070
output_file_data = {}
71-
with open(cfg.final_manifest, "r") as f:
72-
output_data = ndjson.load(f)
73-
for item in output_data:
74-
output_file_data[item["audio_item_id"]] = item
71+
output_data = load_manifest(cfg.final_manifest, encoding="utf8")
72+
for item in output_data:
73+
output_file_data[item["audio_item_id"]] = item
7574

7675
reference_file_data = {}
77-
with open(reference_manifest_file, "r") as f:
78-
reference_data = ndjson.load(f)
79-
for item in reference_data:
80-
reference_file_data[item["audio_item_id"]] = item
76+
reference_data = load_manifest(reference_manifest_file, encoding="utf8")
77+
for item in reference_data:
78+
reference_file_data[item["audio_item_id"]] = item
8179

8280
assert len(output_file_data) == len(reference_file_data)
8381
assert len(output_file_data) == 2

0 commit comments

Comments
 (0)