Convert tests to testr, add flake8 tox command
This commit is contained in:
parent
81439f4fa2
commit
c0f37dc9c0
4
.gitignore
vendored
4
.gitignore
vendored
@ -40,4 +40,6 @@ output/*.html
|
||||
output/*/index.html
|
||||
|
||||
# Sphinx
|
||||
docs/_build
|
||||
docs/_build
|
||||
|
||||
.testrepository
|
||||
|
4
.testr.conf
Normal file
4
.testr.conf
Normal file
@ -0,0 +1,4 @@
|
||||
[DEFAULT]
|
||||
test_command=python -m subunit.run discover requests_mock $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
27
setup.cfg
27
setup.cfg
@ -1,2 +1,27 @@
|
||||
[metadata]
|
||||
name = requests-mock
|
||||
author = Jamie Lennox
|
||||
author-email = jamielennox@gmail.com
|
||||
summary = Mock out responses from the requests package
|
||||
description-file = README.rst
|
||||
license = Apache-2
|
||||
classifier =
|
||||
Development Status :: 2 - Pre-Alpha
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: Information Technology
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: OS Independent
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 2.6
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.3
|
||||
Topic :: Software Development :: Testing
|
||||
test_suite = requests_mock.tests
|
||||
|
||||
[files]
|
||||
packages = requests_mock
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
universal = 1
|
||||
|
48
setup.py
48
setup.py
@ -1,50 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
try:
|
||||
from setuptools import setup
|
||||
except ImportError:
|
||||
from distutils.core import setup
|
||||
|
||||
if sys.argv[-1] == 'publish':
|
||||
os.system('python setup.py sdist upload')
|
||||
sys.exit()
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
name='requests-mock',
|
||||
version='0.1.0-dev',
|
||||
description='Mock out the requests package',
|
||||
author='Jamie Lennox',
|
||||
author_email='jamielennox@gmail.com',
|
||||
url='https://github.com/jamielennox/requests-mock',
|
||||
packages=[
|
||||
'requests_mock',
|
||||
],
|
||||
package_dir={'requests_mock': 'requests_mock'},
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'requests',
|
||||
'fixtures',
|
||||
],
|
||||
test_requires=[
|
||||
'testtools'
|
||||
],
|
||||
license="BSD",
|
||||
zip_safe=False,
|
||||
keywords='requests mock',
|
||||
classifiers=[
|
||||
'Development Status :: 2 - Pre-Alpha',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: Apache Software License'
|
||||
'Natural Language :: English',
|
||||
"Programming Language :: Python :: 2",
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
],
|
||||
test_suite='requests_mock.tests',
|
||||
setup_requires=['pbr'],
|
||||
pbr=True,
|
||||
)
|
||||
|
@ -1,2 +1,3 @@
|
||||
fixtures
|
||||
testrepository>=0.0.18
|
||||
testtools
|
||||
|
10
tox.ini
10
tox.ini
@ -1,10 +1,16 @@
|
||||
[tox]
|
||||
envlist = py26, py27, py33
|
||||
envlist = py26, py27, py33, pypy, pep8
|
||||
|
||||
[testenv]
|
||||
setenv =
|
||||
PYTHONPATH = {toxinidir}:{toxinidir}/requests-mock
|
||||
commands = python setup.py test
|
||||
commands = python setup.py testr
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8 requests_mock
|
||||
deps =
|
||||
flake8
|
||||
{[testenv]deps}
|
||||
|
Loading…
Reference in New Issue
Block a user