mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Support for python setup.py test
to run the tox suite.
This commit is contained in:
parent
5394ba9435
commit
c00f33e62d
3 changed files with 24 additions and 3 deletions
|
@ -8,6 +8,7 @@ dpaste Changelog
|
|||
* Windows users can submit the form using Ctrl+Enter
|
||||
* The raw view now sends the X-Content-Type-Options=nosniff header
|
||||
* Various constants can now be overridden by settings
|
||||
* Support for `python setup.py test` to run the tox suite
|
||||
|
||||
2.1 (2013-12-14)
|
||||
----------------
|
||||
|
|
22
setup.py
22
setup.py
|
@ -1,5 +1,19 @@
|
|||
#!/usr/bin/env python
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools.command.test import test as TestCommand
|
||||
from sys import exit
|
||||
|
||||
class Tox(TestCommand):
|
||||
def finalize_options(self):
|
||||
TestCommand.finalize_options(self)
|
||||
self.test_args = []
|
||||
self.test_suite = True
|
||||
|
||||
def run_tests(self):
|
||||
#import here, cause outside the eggs aren't loaded
|
||||
import tox
|
||||
errno = tox.cmdline(self.test_args)
|
||||
exit(errno)
|
||||
|
||||
setup(
|
||||
name='dpaste',
|
||||
|
@ -28,5 +42,11 @@ setup(
|
|||
'django-mptt>=0.6.0',
|
||||
'pygments>=1.6',
|
||||
'requests>=2.0.0',
|
||||
]
|
||||
],
|
||||
tests_require=[
|
||||
'tox==1.6.1'
|
||||
],
|
||||
cmdclass={
|
||||
'test': Tox
|
||||
},
|
||||
)
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -17,7 +17,7 @@ deps=django==1.4.10
|
|||
deps=django==1.5.5
|
||||
|
||||
[testenv:py27-django-1.6]
|
||||
deps=django==1.6
|
||||
deps=django==1.6.1
|
||||
|
||||
[testenv:py33-django-1.6]
|
||||
deps=django==1.6
|
||||
deps=django==1.6.1
|
||||
|
|
Loading…
Reference in a new issue