Skip to content

Commit

Permalink
new folder names for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LoannPeurey committed Nov 23, 2023
1 parent d0b3185 commit fbb363b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ChildProject.projects import ChildProject, CONVERTED_RECORDINGS
from ChildProject.projects import ChildProject, Paths
from ChildProject.pipelines.processors import AudioProcessingPipeline
import numpy as np
import os
Expand Down Expand Up @@ -34,7 +34,7 @@ def test_basic(project):
8000, project.compute_recordings_duration()["duration"].sum()
), "audio duration equals expected value"
assert os.path.exists(
os.path.join(project.path, CONVERTED_RECORDINGS, "test")
project.path / Paths.CONVERTED_RECORDINGS / "test"
), "missing processed recordings folder"
assert (
recordings.shape[0] == converted_recordings.shape[0]
Expand All @@ -45,12 +45,13 @@ def test_basic(project):
assert all(
[
os.path.exists(
os.path.join(project.path, CONVERTED_RECORDINGS, "test", f)
project.path / Paths.CONVERTED_RECORDINGS / "test" / f
)
for f in converted_recordings["converted_filename"].tolist()
]
), "recording files are missing"


def test_standard(project):
# Starting the audio processing pipeline using the default settings
processed, parameters = AudioProcessingPipeline().run(
Expand All @@ -65,7 +66,7 @@ def test_standard(project):
8000, project.compute_recordings_duration()["duration"].sum()
), "audio duration equals expected value"
assert os.path.exists(
os.path.join(project.path, CONVERTED_RECORDINGS, "test")
project.path / Paths.CONVERTED_RECORDINGS / "test"
), "missing processed recordings folder"
assert (
recordings.shape[0] == converted_recordings.shape[0]
Expand All @@ -76,7 +77,7 @@ def test_standard(project):
assert all(
[
os.path.exists(
os.path.join(project.path, CONVERTED_RECORDINGS, "test", f)
project.path / Paths.CONVERTED_RECORDINGS / "test" / f
)
for f in converted_recordings["converted_filename"].tolist()
]
Expand Down

0 comments on commit fbb363b

Please sign in to comment.