Skip to content

Commit

Permalink
additional travis compatibility changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 6, 2015
1 parent 0b43976 commit b5194da
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 29 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repo_token: TagM2COnwKYL3YaS7He9DkBPA7GFDQwsH
18 changes: 10 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ language: python
os:
- linux
- osx
#python: 2.7
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
env:
matrix:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=docs
global:
- secure: EUpWmrnhHKPkz9cOGbEEwhBtUBRqtQ775ck042B8/pI9ZZZghbKl3Jm8ahpfms3JiZcHMCG06MBREs1ISK/g2OfHKsdULCg5g3UFXteVQo769kwh/x4lniSbU2eipcN0s9Q/Ak5zStwTa5aNQ4FU/3zSgTDxi/OcDKGXDbVwHD8=
- secure: l/xwPJ01auD8LSRb9AaMXtqZ08uELw85zjnA/C3A72TvQip/zxrtlaFgSy7qEuMJxlSR8avNIhOeXNTwyU8WuSyn8E3OgLVbmiVwPO5w9Pt80Q34jrGxRO0HTpZY4YSJENDgV+IFswo9tMZx4qgQIcTHeADSHZgfY0cCQLaQ2Vk=
Expand All @@ -19,9 +17,13 @@ env:
install:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- pip install -r requirements-opt.txt || "Failing to install optional requirements will not fail the build."
- pip install coveralls
script:
- ./pretest
- travis_wait tox --skip-missing-interpreters -e $TOX_ENV
- travis_wait coverage run --source=jira setup.py test
after_success:
coveralls
branches:
only:
- master
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Sphinx
autopep8
oauthlib
coveralls
pep8
pytest>=2.6.0
pytest-cov
Expand Down
26 changes: 23 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
#!/usr/bin/env python

import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand


class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []

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 pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)

exec(open('jira/version.py').read())
setup(
name='jira', # was jira-python
version=__version__,
cmdclass = {'test': PyTest},
packages=find_packages(exclude=['tests', 'tools']),
include_package_data=True,
# test_suite='nose.collector',
Expand All @@ -15,8 +36,7 @@
'tlslite>=0.4.4',
'six>=1.5.2'],
setup_requires=[],
tests_require=['tlslite>=0.4.4', 'xmlrunner>=1.7.3', 'requests>=1.2.3', 'setuptools', 'tox', 'pep8', 'autopep8',
'sphinx', 'six>=1.5.2'],
tests_require=['pytest', 'tlslite>=0.4.4', 'requests>=2.0', 'setuptools', 'pep8', 'autopep8', 'sphinx', 'six>=1.9.0'],
extras_require={
'magic': ['filemagic>=1.6'],
'shell': ['ipython>=0.13'],
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,5 +1757,5 @@ def test_kill_websudo_without_login_raises(self):
# print(j.session())

dirname = "test-reports-%s%s" % (sys.version_info[0], sys.version_info[1])
unittest.main(testRunner=xmlrunner.XMLTestRunner(output=dirname))
unittest.main()
# pass
18 changes: 1 addition & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[tox]
minversion=1.3
envlist = py27,py26,py34,docs
#,py27,py32
#,py27,py32
envlist = py27,py26,py33,py34,docs
addopts = --ignore=setup.py

[testenv:docs]
Expand All @@ -28,7 +26,6 @@ deps=
xmlrunner
wheel
six>=1.7.2
# pytest-growl - removed as not compatible with python 3

commands=
python -m py.test --cov-report xml --cov jira --pyargs jira
Expand All @@ -41,16 +38,3 @@ downloadcache={toxworkdir}/downloadcache
deps=
{[testenv]deps}
unittest2
#commands=
# py.test --pyargs tendo.tests

#[testenv:py25]
#sitepackages=False
#downloadcache={toxworkdir}/downloadcache
#deps=
# {[testenv]deps}
# multiprocessing

#commands=
# py.test --pyargs tendo.tests

0 comments on commit b5194da

Please sign in to comment.