Skip to content

Commit 4314c7e

Browse files
sdaguegermanattanasio
authored andcommitted
Fix failing test in travis-ci add tox.ini for local testing
The last commit changed a feature without updating the test, so is failing in travis ci. This fixes that issue, as well as adding a tox.ini file for easy local testing. Tox is a pretty standard test run setup tool for python projects, and makes it easy to test against multiple python versions simultaneously. The added one is boiler plate for python 2.7, 3.4 -> 3.6, and has a pep8 rule.
1 parent afd22b6 commit 4314c7e

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pylint>=1.4.4
88
coverage<4
99
codecov>=1.6.3
1010
pytest-cov>=2.2.1
11-
requests>=2.8.0
1211

1312
# documentation
1413
recommonmark>=0.2.0

test/test_speech_to_text_v1.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_success():
3434
audio_file, content_type='audio/l16; rate=44100')
3535

3636
request_url = responses.calls[1].request.url
37-
assert request_url == recognize_url + '?continuous=false'
37+
assert request_url == recognize_url
3838
assert responses.calls[1].response.text == recognize_response
3939

4040
assert len(responses.calls) == 2
@@ -219,5 +219,3 @@ def test_custom_words():
219219
assert 'word type must be all, user, or corpora' in str(keyerror.value)
220220

221221
assert len(responses.calls) == 9
222-
223-

tox.ini

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[tox]
2+
envlist = pep8, py27, py34, py35, py36
3+
4+
[testenv]
5+
commands = py.test -v
6+
deps =
7+
-r{toxinidir}/requirements.txt
8+
-r{toxinidir}/requirements-dev.txt
9+
10+
[testenv:pep8]
11+
deps = flake8
12+
commands = flake8
13+
14+
[flake8]
15+
exclude = .venv,.git,.tox,docs
16+
; If you want to make tox run the tests with the same versions, create a
17+
; requirements.txt with the pinned versions and uncomment the following lines:
18+
; deps =
19+
; -r{toxinidir}/requirements.txt

0 commit comments

Comments
 (0)