Skip to content

Commit

Permalink
Merge pull request #14 from vinta/feature/setup-py-test
Browse files Browse the repository at this point in the history
feature/setup-py-test
  • Loading branch information
vinta committed Nov 4, 2013
2 parents 96a7dc3 + 02d6ca9 commit 234024a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ install:
- pip install -r requirements_test.txt --use-mirrors

script:
- coverage run --source=haul tests/test.py
- coverage run --source=haul setup.py test

notifications:
email:
Expand Down
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ History
++++++++++++++++++

- Bug fixed: `#12 <https://github.com/vinta/Haul/issues/12>`_
- Support running tests with `python setup.py test`


1.3.1 (2013-10-24)
Expand Down
3 changes: 1 addition & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,4 @@ Run Tests

.. code-block:: bash
$ cd tests
$ python test.py
$ python setup.py test
6 changes: 0 additions & 6 deletions haul/utils.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# coding: utf-8

import cStringIO
import pprint
import sys


def pp(something):
printer = pprint.PrettyPrinter(indent=2)
printer.pprint(something)


def import_module(name):
__import__(name)

Expand Down
3 changes: 1 addition & 2 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-r requirements.txt
coverage==3.7
coveralls==0.3
coveralls
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
install_requires=install_requires,
include_package_data=True,
packages=packages,
test_suite='tests',
zip_safe=False,
classifiers=(
'Development Status :: 3 - Alpha',
Expand Down
11 changes: 4 additions & 7 deletions tests/test.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# coding: utf-8

import os
import sys
HAUL_ROOT = os.path.abspath(os.path.join(__file__, '../../'))
TESTS_DIR = os.path.abspath(os.path.join(__file__, '../'))
sys.path.insert(0, HAUL_ROOT)

import unittest

from haul import Haul, HaulResult, exceptions
from haul.utils import pp, read_file
from haul.utils import read_file


TESTS_DIR = os.path.abspath(os.path.join(__file__, '../'))


class HaulBaseTestCase(unittest.TestCase):
Expand Down Expand Up @@ -244,5 +242,4 @@ def test_content_type_not_supported(self):


if __name__ == '__main__':
print('testing Haul')
unittest.main()

0 comments on commit 234024a

Please sign in to comment.