Skip to content

Commit

Permalink
Fix test_io_threading to run on Python 3.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
psobot committed Mar 7, 2024
1 parent adf7667 commit 1bac563
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_io_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import random
import threading
from concurrent.futures import ThreadPoolExecutor
from contextlib import nullcontext
from functools import lru_cache
from io import BytesIO

Expand All @@ -28,6 +27,11 @@
from pedalboard import Resample
from pedalboard.io import AudioFile

try:
from contextlib import nullcontext
except ImportError:
from contextlib import suppress as nullcontext

# The number of iterations to run the test for with and
# without a lock around each call to AudioFile's methods:
MAX_ITERATIONS = {"lock": 10, "no lock": 100_000}
Expand Down

0 comments on commit 1bac563

Please sign in to comment.