diff --git a/tests/test_command.py b/tests/test_command.py index e2b41d5a..540a53bb 100644 --- a/tests/test_command.py +++ b/tests/test_command.py @@ -7,9 +7,10 @@ __author__ = "Deezer Research" __license__ = "MIT License" -from spleeter.__main__ import spleeter from typer.testing import CliRunner +from spleeter.__main__ import spleeter + def test_version(): diff --git a/tests/test_eval.py b/tests/test_eval.py index 84056b8a..61aa8a3e 100644 --- a/tests/test_eval.py +++ b/tests/test_eval.py @@ -16,7 +16,6 @@ from spleeter.__main__ import evaluate from spleeter.audio.adapter import AudioAdapter - res_4stems = { "vocals": {"SDR": 3.25e-05, "SAR": -11.153575, "SIR": -1.3849, "ISR": 2.75e-05}, "drums": {"SDR": -0.079505, "SAR": -15.7073575, "SIR": -4.972755, "ISR": 0.0013575}, diff --git a/tests/test_ffmpeg_adapter.py b/tests/test_ffmpeg_adapter.py index 4e834eaa..5bea933e 100644 --- a/tests/test_ffmpeg_adapter.py +++ b/tests/test_ffmpeg_adapter.py @@ -10,16 +10,16 @@ from os.path import join from tempfile import TemporaryDirectory -from spleeter import SpleeterError -from spleeter.audio.adapter import AudioAdapter -from spleeter.audio.ffmpeg import FFMPEGProcessAudioAdapter +import ffmpeg +import numpy as np # pyright: reportMissingImports=false # pylint: disable=import-error from pytest import fixture, raises -import numpy as np -import ffmpeg +from spleeter import SpleeterError +from spleeter.audio.adapter import AudioAdapter +from spleeter.audio.ffmpeg import FFMPEGProcessAudioAdapter # pylint: enable=import-error diff --git a/tests/test_separator.py b/tests/test_separator.py index 46516dcf..6c152a7f 100644 --- a/tests/test_separator.py +++ b/tests/test_separator.py @@ -8,12 +8,11 @@ __license__ = "MIT License" import itertools -from os.path import splitext, basename, exists, join +from os.path import basename, exists, join, splitext from tempfile import TemporaryDirectory -import pytest import numpy as np - +import pytest import tensorflow as tf from spleeter import SpleeterError diff --git a/tests/test_train.py b/tests/test_train.py index e93ecfe6..a828a610 100644 --- a/tests/test_train.py +++ b/tests/test_train.py @@ -9,18 +9,16 @@ import json import os - from os import makedirs from os.path import join from tempfile import TemporaryDirectory import numpy as np import pandas as pd - -from spleeter.audio.adapter import AudioAdapter -from spleeter.__main__ import spleeter from typer.testing import CliRunner +from spleeter.__main__ import spleeter +from spleeter.audio.adapter import AudioAdapter TRAIN_CONFIG = { "mix_name": "mix",