Skip to content

Commit

Permalink
Add test automation tools
Browse files Browse the repository at this point in the history
frankhinek committed Dec 29, 2017
1 parent a011896 commit 4b38306
Showing 8 changed files with 72 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ build/
dist/
*.egg-info/
*.egg
.eggs/
*.py[cod]
__pycache__/
*.so
@@ -14,3 +15,6 @@ __pycache__/

# PyCharm
.idea

# VSCode
.vscode
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: python
python:
- 3.5
- 2.7

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -U tox-travis

# command to run tests, e.g. python setup.py test
script: tox
11 changes: 11 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pip==8.1.2
bumpversion==0.5.3
wheel==0.29.0
watchdog==0.8.3
flake8==2.6.0
tox==2.3.1
coverage==4.1
Sphinx==1.4.8

pytest==2.9.2
pytest-runner==2.11.1
8 changes: 7 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -2,4 +2,10 @@
# This flag says that the code is written to work on both Python 2 and Python
# 3. If at all possible, it is good practice to do this. If you cannot, you
# will need to generate wheels for each Python version that you support.
universal=1
universal = 1

[flake8]
exclude = docs

[aliases]
test = pytest
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -81,4 +81,7 @@
# https://packaging.python.org/en/latest/requirements.html
install_requires=['protobuf', 'grpcio'],

test_suite='tests',
tests_require=['pytest'],
setup_requires=['pytest-runner'],
)
3 changes: 3 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-

"""Unit test package for pypachy."""
13 changes: 13 additions & 0 deletions tests/test_pypachy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Tests for `pypachy` package."""

import pytest


import pypachy


def test_always_true():
assert True == True
21 changes: 21 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tox]
envlist = py27, py35, flake8

[travis]
python =
3.5: py35
2.7: py27

[testenv:flake8]
basepython=python
deps=flake8
commands=flake8 pypachy

[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
commands =
pip install -U pip
py.test --basetemp={envtmpdir}

0 comments on commit 4b38306

Please sign in to comment.