Refactor test cases for improved readability and consistency
All checks were successful
Backend CI / lint (push) Successful in 9m49s
Backend CI / test (push) Successful in 6m15s

- Adjusted function signatures in various test files to enhance clarity by aligning parameters.
- Updated patching syntax for better readability across test cases.
- Improved formatting and spacing in test assertions and mock setups.
- Ensured consistent use of async/await patterns in async test functions.
- Enhanced comments for better understanding of test intentions.
This commit is contained in:
JSC
2025-08-01 20:53:30 +02:00
parent d926779fe4
commit 6068599a47
39 changed files with 691 additions and 286 deletions

View File

@@ -140,7 +140,10 @@ class SoundNormalizerService:
stream = ffmpeg.overwrite_output(stream)
await asyncio.to_thread(
ffmpeg.run, stream, quiet=True, overwrite_output=True,
ffmpeg.run,
stream,
quiet=True,
overwrite_output=True,
)
logger.info("One-pass normalization completed: %s", output_path)
@@ -180,7 +183,10 @@ class SoundNormalizerService:
# Run first pass and capture output
try:
result = await asyncio.to_thread(
ffmpeg.run, stream, capture_stderr=True, quiet=True,
ffmpeg.run,
stream,
capture_stderr=True,
quiet=True,
)
analysis_output = result[1].decode("utf-8")
except ffmpeg.Error as e:
@@ -262,7 +268,10 @@ class SoundNormalizerService:
try:
await asyncio.to_thread(
ffmpeg.run, stream, quiet=True, overwrite_output=True,
ffmpeg.run,
stream,
quiet=True,
overwrite_output=True,
)
logger.info("Two-pass normalization completed: %s", output_path)
except ffmpeg.Error as e: