Skip to content

Commit

Permalink
travis fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bubenkoff committed Apr 9, 2015
1 parent 61a9832 commit 5d7c094
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 31 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ env:
install:
- pip install tox
script: tox -e $TESTENV
notifications:
email:
- bubenkoff@gmail.com
- oleg.pidsadnyi@gmail.com
30 changes: 0 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,11 @@

import codecs
import os
import sys

from setuptools import setup
from setuptools.command.test import test as TestCommand

import pytest_factoryboy


class ToxTestCommand(TestCommand):

"""Test command which runs tox under the hood."""

user_options = [('tox-args=', 'a', "Arguments to pass to tox")]

def initialize_options(self):
"""Initialize options and set their defaults."""
TestCommand.initialize_options(self)
self.tox_args = '--recreate'

def finalize_options(self):
"""Add options to the test runner (tox)."""
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
"""Invoke the test runner (tox)."""
# import here, cause outside the eggs aren't loaded
import tox
import shlex
errno = tox.cmdline(args=shlex.split(self.tox_args))
sys.exit(errno)


dirname = os.path.dirname(__file__)

long_description = (
Expand Down Expand Up @@ -67,7 +38,6 @@ def run_tests(self):
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3"
] + [("Programming Language :: Python :: %s" % x) for x in "2.6 2.7 3.0 3.1 3.2 3.3 3.4".split()],
cmdclass={"test": ToxTestCommand},
install_requires=[
"six",
"factory_boy",
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ deps = -r{toxinidir}/requirements-testing.txt
[testenv:coveralls]
deps =
coveralls
-e.
-r{toxinidir}/requirements-testing.txt
commands =
py.test --cov=pytest_factoryboy --cov-report=term-missing tests
coverage run --source=pytest_factoryboy {envdir}/bin/py.test tests
coverage report -m
coveralls

[pytest]
Expand Down

0 comments on commit 5d7c094

Please sign in to comment.