mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Fixed all pytest errors, enhanced book parser with context management and resource cleanup, update tests for proper parser closure
This commit is contained in:
+7
-4
@@ -28,10 +28,13 @@ def _soundfile_write_stub(
|
||||
pass
|
||||
|
||||
|
||||
if "soundfile" not in sys.modules: # pragma: no cover - import guard
|
||||
stub = ModuleType("soundfile")
|
||||
stub.write = _soundfile_write_stub # type: ignore[attr-defined]
|
||||
sys.modules["soundfile"] = stub
|
||||
try:
|
||||
import soundfile
|
||||
except ImportError:
|
||||
if "soundfile" not in sys.modules: # pragma: no cover - import guard
|
||||
stub = ModuleType("soundfile")
|
||||
stub.write = _soundfile_write_stub # type: ignore[attr-defined]
|
||||
sys.modules["soundfile"] = stub
|
||||
|
||||
|
||||
def _static_ffmpeg_add_paths_stub(*_args, **_kwargs) -> None: # pragma: no cover - stub
|
||||
|
||||
Reference in New Issue
Block a user