Skip to content

Commit 6be5239

Browse files
committed
test: add verbose ffmpeg messages in verbose mode
1 parent d4b491f commit 6be5239

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

aligner/tests/test_cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
from ..classes import Segment
2323
from ..cli import app
2424

25+
VERBOSE_OVERRIDE = bool(os.environ.get("EVERYVOICE_VERBOSE_TESTS", False))
26+
2527

2628
class CLITest(TestCase):
2729
def setUp(self) -> None:
@@ -83,8 +85,11 @@ def test_align_something(self):
8385
wav = tmppath / "ej-fra.wav"
8486
# Under most circumstances, align can take a .m4a input file, but not
8587
# in CI. It's not a hard requirement, so just convert to .wav.
86-
subprocess.run(["ffmpeg", "-i", m4a, wav], capture_output=True)
87-
# os.system("ls -la " + tmpdir)
88+
result = subprocess.run(["ffmpeg", "-i", m4a, wav], capture_output=True)
89+
if VERBOSE_OVERRIDE:
90+
print(result.stdout)
91+
print(tmpdir)
92+
os.system("ls -la " + tmpdir)
8893
textgrid = tmppath / "ej-fra-16000.TextGrid"
8994
wav_out = tmppath / "ej-fra-16000.wav"
9095

0 commit comments

Comments
 (0)