diff --git a/python_apps/airtime_analyzer/tests/analyzer_pipeline_test.py b/python_apps/airtime_analyzer/tests/analyzer_pipeline_test.py index a9884627f..56c771843 100644 --- a/python_apps/airtime_analyzer/tests/analyzer_pipeline_test.py +++ b/python_apps/airtime_analyzer/tests/analyzer_pipeline_test.py @@ -9,7 +9,7 @@ from airtime_analyzer.analyzer_pipeline import AnalyzerPipeline from .conftest import AUDIO_FILENAME, AUDIO_IMPORT_DEST -def test_basic(src_dir, dest_dir): +def test_run_analysis(src_dir, dest_dir): queue = Queue() AnalyzerPipeline.run_analysis( queue, diff --git a/python_apps/airtime_analyzer/tests/cuepoint_analyzer_test.py b/python_apps/airtime_analyzer/tests/cuepoint_analyzer_test.py index 457c300d8..3e2b57c7f 100644 --- a/python_apps/airtime_analyzer/tests/cuepoint_analyzer_test.py +++ b/python_apps/airtime_analyzer/tests/cuepoint_analyzer_test.py @@ -30,18 +30,18 @@ def test_analyze(filepath): assert abs(float(metadata["cueout"]) - length_seconds) < tolerance_seconds -def test_missing_silan(): +def test_analyze_missing_silan(): old = CuePointAnalyzer.SILAN_EXECUTABLE CuePointAnalyzer.SILAN_EXECUTABLE = "foobar" CuePointAnalyzer.analyze("tests/test_data/44100Hz-16bit-mono.mp3", dict()) CuePointAnalyzer.SILAN_EXECUTABLE = old -def test_invalid_filepath(): +def test_analyze_invalid_filepath(): with pytest.raises(KeyError): test_analyze("non-existent-file") -def test_invalid_wma(): +def test_analyze_invalid_wma(): with pytest.raises(KeyError): test_analyze("tests/test_data/44100Hz-16bit-stereo-invalid.wma") diff --git a/python_apps/airtime_analyzer/tests/filemover_analyzer_test.py b/python_apps/airtime_analyzer/tests/filemover_analyzer_test.py index 6e1ae1b29..bc6f97867 100644 --- a/python_apps/airtime_analyzer/tests/filemover_analyzer_test.py +++ b/python_apps/airtime_analyzer/tests/filemover_analyzer_test.py @@ -9,7 +9,7 @@ from airtime_analyzer.filemover_analyzer import FileMoverAnalyzer from .conftest import AUDIO_FILENAME -def test_dont_use_analyze(): +def test_analyze(): with pytest.raises(Exception): FileMoverAnalyzer.analyze("foo", dict()) @@ -28,7 +28,7 @@ def test_move_wrong_params(params, exception): FileMoverAnalyzer.move(*params) -def test_basic(src_dir, dest_dir): +def test_move(src_dir, dest_dir): FileMoverAnalyzer.move( os.path.join(src_dir, AUDIO_FILENAME), dest_dir, @@ -38,7 +38,7 @@ def test_basic(src_dir, dest_dir): assert os.path.exists(os.path.join(dest_dir, AUDIO_FILENAME)) -def test_basic_samefile(src_dir): +def test_move_samefile(src_dir): FileMoverAnalyzer.move( os.path.join(src_dir, AUDIO_FILENAME), src_dir, @@ -70,7 +70,7 @@ def import_and_restore(src_dir, dest_dir) -> dict: return metadata -def test_duplicate_file(src_dir, dest_dir): +def test_move_duplicate_file(src_dir, dest_dir): # Import the file once import_and_restore(src_dir, dest_dir) @@ -82,7 +82,7 @@ def test_duplicate_file(src_dir, dest_dir): assert os.path.exists(os.path.join(dest_dir, AUDIO_FILENAME)) -def test_double_duplicate_files(src_dir, dest_dir): +def test_move_triplicate_file(src_dir, dest_dir): # Here we use mock to patch out the time.localtime() function so that it # always returns the same value. This allows us to consistently simulate this test cases # where the last two of the three files are imported at the same time as the timestamp. @@ -108,7 +108,7 @@ def test_double_duplicate_files(src_dir, dest_dir): assert len(os.path.basename(metadata2["full_path"]).split("_")) == 3 -def test_bad_permissions_destination_dir(src_dir): +def test_move_bad_permissions_dest_dir(src_dir): with pytest.raises(OSError): # /sys is using sysfs on Linux, which is unwritable FileMoverAnalyzer.move( diff --git a/python_apps/airtime_analyzer/tests/playability_analyzer_test.py b/python_apps/airtime_analyzer/tests/playability_analyzer_test.py index 2f71b2d27..1e8480c1a 100644 --- a/python_apps/airtime_analyzer/tests/playability_analyzer_test.py +++ b/python_apps/airtime_analyzer/tests/playability_analyzer_test.py @@ -26,23 +26,23 @@ def test_analyze(filepath): PlayabilityAnalyzer.analyze(filepath, dict()) -def test_missing_liquidsoap(): +def test_analyze_missing_liquidsoap(): old = PlayabilityAnalyzer.LIQUIDSOAP_EXECUTABLE PlayabilityAnalyzer.LIQUIDSOAP_EXECUTABLE = "foobar" PlayabilityAnalyzer.analyze("tests/test_data/44100Hz-16bit-mono.mp3", dict()) PlayabilityAnalyzer.LIQUIDSOAP_EXECUTABLE = old -def test_invalid_filepath(): +def test_analyze_invalid_filepath(): with pytest.raises(UnplayableFileError): test_analyze("non-existent-file") -# def test_invalid_wma(): +# def test_analyze_invalid_wma(): # with pytest.raises(UnplayableFileError): # test_analyze("tests/test_data/44100Hz-16bit-stereo-invalid.wma") -def test_unknown(): +def test_analyze_unknown(): with pytest.raises(UnplayableFileError): test_analyze("https://www.google.com") diff --git a/python_apps/airtime_analyzer/tests/replaygain_analyzer_test.py b/python_apps/airtime_analyzer/tests/replaygain_analyzer_test.py index 3829576ea..1ffd1b3b1 100644 --- a/python_apps/airtime_analyzer/tests/replaygain_analyzer_test.py +++ b/python_apps/airtime_analyzer/tests/replaygain_analyzer_test.py @@ -28,18 +28,18 @@ def test_analyze(filepath): assert abs(metadata["replay_gain"] - expected_replaygain) < tolerance -def test_missing_replaygain(): +def test_analyze_missing_replaygain(): old = ReplayGainAnalyzer.REPLAYGAIN_EXECUTABLE ReplayGainAnalyzer.REPLAYGAIN_EXECUTABLE = "foobar" ReplayGainAnalyzer.analyze("tests/test_data/44100Hz-16bit-mono.mp3", dict()) ReplayGainAnalyzer.REPLAYGAIN_EXECUTABLE = old -def test_invalid_filepath(): +def test_analyze_invalid_filepath(): with pytest.raises(KeyError): test_analyze("non-existent-file") -def test_invalid_wma(): +def test_analyze_invalid_wma(): with pytest.raises(KeyError): test_analyze("tests/test_data/44100Hz-16bit-stereo-invalid.wma")