Skip to content

Commit 1255bd1

Browse files
committed
Move pytest import
1 parent 6ec7718 commit 1255bd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/torchaudio/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from .download import download_asset
55
import os
66
from torchcodec.decoders import AudioDecoder
7-
import pytest
87

98
def load_torchcodec(file, **args):
109
try:
@@ -16,6 +15,7 @@ def load_torchcodec(file, **args):
1615
return (samples.data, samples.sample_rate)
1716
except Exception as e:
1817
if "buggy FFmpeg version" in str(e) and "PYTEST_CURRENT_TEST" in os.environ:
18+
import pytest
1919
pytest.skip()
2020
else:
2121
raise e

0 commit comments

Comments
 (0)