Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support python3.6 #38

Merged
merged 2 commits into from
Oct 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ python:
- 2.6
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
install:
- pip install requests
- python setup.py install
script: ./runtests.sh
install: pip install -U tox-travis
script: tox
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],

# What does your project relate to?
Expand Down
8 changes: 8 additions & 0 deletions tests/test_httpbin.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ def test_httpbin_str(httpbin):
def test_chunked_encoding(httpbin_both):
assert requests.get(httpbin_both.url + '/stream/20').status_code == 200


def test_post_chunked_binary(httpbin_both):
data1 = iter([b'data', b'to', b'send'])
url = httpbin_both.url + '/post'
resp = requests.post(url, data1)
assert resp.json()['data'] == b'datatosend'


@pytest_httpbin.use_class_based_httpbin
@pytest_httpbin.use_class_based_httpbin_secure
class TestClassBassedTests(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# content of: tox.ini , put in same dir as setup.py

[tox]
envlist = py26, py27, py33, py34, pypy
envlist = py26, py27, py33, py34, py35, py36, pypy, pypy3

[testenv]
deps = pytest
Expand Down