diff --git a/.dockerignore b/.dockerignore index e4d42c8e..205f6e45 100644 --- a/.dockerignore +++ b/.dockerignore @@ -22,3 +22,4 @@ Makefile setup.py tests.py ProxyPy.png +requirements-testing.txt diff --git a/.travis.yml b/.travis.yml index 3cc21e59..8fbe904f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ matrix: os: osx osx_image: xcode11 language: shell + python: 3.7 - name: "Python 3.7 on Windows" os: windows language: shell @@ -18,4 +19,8 @@ matrix: env: - PATH=/c/Python37:/c/Python37/Scripts:$PATH - TESTING_ON_TRAVIS=1 -script: python3 tests.py || python tests.py +install: + - pip3 install -r requirements-testing.txt +script: python3 -m coverage run tests.py || python -m coverage run tests.py +after_success: + - coveralls diff --git a/Makefile b/Makefile index 07143f77..deb3c17b 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,8 @@ release: package twine upload dist/* coverage: - coverage run tests.py - coverage html + coverage3 run tests.py + coverage3 html open htmlcov/index.html flake8: diff --git a/README.md b/README.md index 65090d09..17110a4d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Proxy.Py](ProxyPy.png)](https://github.com/abhinavsingh/proxy.py) -[![alt text](https://travis-ci.org/abhinavsingh/proxy.py.svg?branch=develop "Build Status")](https://travis-ci.org/abhinavsingh/proxy.py/) +[![alt text](https://travis-ci.org/abhinavsingh/proxy.py.svg?branch=develop "Build Status")](https://travis-ci.org/abhinavsingh/proxy.py/) [![Coverage Status](https://coveralls.io/repos/github/abhinavsingh/proxy.py/badge.svg?branch=develop)](https://coveralls.io/github/abhinavsingh/proxy.py?branch=develop) Features -------- diff --git a/requirements-dev.txt b/requirements-testing.txt similarity index 64% rename from requirements-dev.txt rename to requirements-testing.txt index 174eaf8f..92d29063 100644 --- a/requirements-dev.txt +++ b/requirements-testing.txt @@ -1,3 +1,4 @@ +python-coveralls==2.9.3 coverage==4.5.2 flake8==3.7.8 twine==1.12.1 diff --git a/tests.py b/tests.py index c30d0958..1a79ffde 100644 --- a/tests.py +++ b/tests.py @@ -880,7 +880,7 @@ class TestMain(unittest.TestCase): class TestHttpRequestRejected(unittest.TestCase): - def setUp(self) -> None: + def setUp(self): self.request = proxy.HttpParser(proxy.HttpParser.types.REQUEST_PARSER) def test_empty_response(self):