Skip to content

Commit

Permalink
fix(tests): try not to test where no sox
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Dec 28, 2023
1 parent ae152c2 commit 541c916
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
with:
python-version: ${{ matrix.py }}
- name: Install sox
if: ${{ matrix.os == "ubuntu-latest" }}
run: sudo apt-get install sox
- name: Install tox
run: python -m pip install tox-gh>=1.2
Expand Down
13 changes: 8 additions & 5 deletions cython/test/endpointer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,14 @@ def srtest(self, sample_rate):
idx += 1

def testEndpointer(self):
set_loglevel("INFO")
# 8000, 44100, 48000 give slightly different results unfortunately
for sample_rate in 11025, 16000, 22050, 32000:
print(sample_rate)
self.srtest(sample_rate)
try:
set_loglevel("INFO")
# 8000, 44100, 48000 give slightly different results unfortunately
for sample_rate in 11025, 16000, 22050, 32000:
print(sample_rate)
self.srtest(sample_rate)
except OSError as err:
self.skipTest("sox not installed: %s" % err)


if __name__ == "__main__":
Expand Down

0 comments on commit 541c916

Please sign in to comment.