Skip to content

Commit 5a4229f

Browse files
committed
Extra tests for Travis
1 parent ef4c511 commit 5a4229f

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ install:
1919
# run tests
2020
script:
2121
- export PYTHONPATH=$PYTHONPATH:./
22+
- curl 'https://zenodo.org/record/3345256/files/mad.pt?download=1' > autosynch/mad_twinnet/outputs/states/mad.pt
2223
- pytest --cov-config=.coveragerc --cov=autosynch tests/
2324

2425
# only test phase2

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# autosynch repository
22

3+
[![Build Status](https://travis-ci.com/chriswang030/autosynch.svg?branch=phase2)](https://travis-ci.com/chriswang030/autosynch)
4+
35
WORK IN PROGRESS
46

57
This branch will contain additional work done in phase 2 of GSoC, including:
@@ -8,4 +10,5 @@ This branch will contain additional work done in phase 2 of GSoC, including:
810
- syllable alignment of music and lyrics
911
- initial testing for real-time processing
1012

11-
To get weights trained on MedleyDB_V1, download it here: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3334973.svg)](https://doi.org/10.5281/zenodo.3334973)
13+
Get weights trained on MedleyDB_V1 here: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3334973.svg)](https://doi.org/10.5281/zenodo.3334973)
14+
Get weights trained on MedleyDB_V2 here: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3345256.svg)](https://doi.org/10.5281/zenodo.3345256)

tests/test_twinnet.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ def test_generate_output_path(audio_file):
2121
assert twinnet._make_target_file_names(['1&*!!.wav']) == [['1&*!!_voice.wav', '1&*!!_bg_music.wav']]
2222
assert twinnet._make_target_file_names(['1', '2']) == [['1_voice.wav', '1_bg_music.wav'], ['2_voice.wav', '2_bg_music.wav']]
2323

24-
# Commented out for Travis since `mad.pt` not in Github repo
25-
# def test_twinnet_process_writes_to_file(audio_file, tmpdir):
26-
# """Requires `mad.pt` in `mad_twinnet/outputs/states` to work"""
27-
# out_base = os.path.splitext(os.path.basename(audio_file))[0] + '_voice.wav'
28-
# out_path = os.path.join(str(tmpdir), out_base)
29-
#
30-
# assert twinnet.twinnet_process(audio_file, [[out_path, '']]) is True
31-
# assert os.path.isfile(out_path)
24+
def test_twinnet_process_writes_to_file(audio_file, tmpdir):
25+
"""Requires `mad.pt` in `mad_twinnet/outputs/states` to work"""
26+
out_base = os.path.splitext(os.path.basename(audio_file))[0] + '_voice.wav'
27+
out_path = os.path.join(str(tmpdir), out_base)
28+
29+
assert twinnet.twinnet_process(audio_file, [[out_path, '']]) is True
30+
assert os.path.isfile(out_path)

0 commit comments

Comments
 (0)