From fbb363b30452b8998b1c4415b797c34b63d8a0d9 Mon Sep 17 00:00:00 2001 From: Loann Peurey Date: Thu, 23 Nov 2023 16:14:24 +0100 Subject: [PATCH] new folder names for tests --- tests/test_convert.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_convert.py b/tests/test_convert.py index 5d982064..1255984b 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -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 @@ -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] @@ -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( @@ -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] @@ -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() ]