Skip to content

Commit

Permalink
move testing stuff to tox
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mixas committed Aug 9, 2020
1 parent 5481ab7 commit a969bf7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Expand Up @@ -9,12 +9,13 @@ python:
matrix:
include:
- python: '3.8'
script: coverage run --source nested_diff setup.py test
install:
- pip install --quiet --upgrade coveralls tox
script: tox -e coverage
after_success:
- coveralls
install:
- pip install --quiet --upgrade coveralls pytest
script: python setup.py test
sudo: false
- pip install --quiet --upgrade tox
script: tox -e py
notifications:
email: false
3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.

12 changes: 0 additions & 12 deletions setup.py
@@ -1,20 +1,11 @@
import setuptools
import sys

import nested_diff


with open('README.md') as f:
long_description = f.read()

flake8_modules = [
'flake8-commas',
'flake8_quotes',
]

if sys.version_info >= (3, 6):
flake8_modules.append('flake8-bugbear')

setuptools.setup(
name='nested_diff',
version=nested_diff.__version__,
Expand Down Expand Up @@ -43,9 +34,6 @@
author_email='mixas.sr@gmail.com',
license='Apache License 2.0',
packages=['nested_diff'],
test_suite='tests',
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-flake8', 'pyyaml'] + flake8_modules,
entry_points={
'console_scripts': [
'nested_diff=nested_diff.diff_tool:cli',
Expand Down
26 changes: 26 additions & 0 deletions tox.ini
@@ -0,0 +1,26 @@
[tox]
envlist = py
usedevelop = true

[testenv]
commands =
pytest --flake8

deps =
flake8-commas
flake8-bugbear ; python_version >= '3.6'
flake8_quotes
pytest
pytest-flake8
pyyaml==5.2 ; python_version < '3.5'
pyyaml ; python_version >= '3.5'

setenv = PYTHONHASHSEED = 1

[testenv:coverage]
deps =
{[testenv]deps}
coverage

commands =
coverage run --source nested_diff -m pytest

0 comments on commit a969bf7

Please sign in to comment.