Skip to content

Commit

Permalink
Merge pull request #475 from singingwolfboy/travis-coveralls
Browse files Browse the repository at this point in the history
Integrate with Travis and Coveralls
  • Loading branch information
Elad Alfassa committed Mar 7, 2014
2 parents a2c3170 + 83b533d commit 6d17d28
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: python
python:
- "2.7"
- "3.3"
git:
submodules: false
install:
- sudo apt-get install -qq python-enchant
- pip install -r dev-requirements.txt
- pip install coveralls
script:
- coverage run --source willie -m py.test .
- coverage report --show-missing
after_success:
- coveralls
7 changes: 7 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# python modules that must be installed before the tests can run
backports.ssl_match_hostname
lxml
pygeoip
praw
feedparser
pyenchant
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def do_setup():
tmp_main_script = os.path.join(tmp_dir, 'willie')
shutil.copy('willie.py', tmp_main_script)

with open("dev-requirements.txt") as f:
requires = [line for line in f.readlines()
if not line.startswith("#")]

setup(
name='willie',
version=__version__,
Expand All @@ -30,8 +34,7 @@ def do_setup():
scripts=[tmp_main_script],
license='Eiffel Forum License, version 2',
platforms='Linux x86, x86-64',
requires=[b'feedparser', b'pytz', b'lxml', b'praw', b'enchant',
b'pygeoip', b'backports.ssl_match_hostname']
requires=requires,
)
finally:
try:
Expand Down
1 change: 1 addition & 0 deletions willie/modules/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Licensed under the Eiffel Forum License 2.
"""
from __future__ import unicode_literals
from willie.module import commands, example, NOLIMIT
import re

Expand Down
2 changes: 1 addition & 1 deletion willie/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test():
assert len(wrapper.output) == len(results)
for result, output in zip(results, wrapper.output):
if type(output) is bytes:
output = output.decode()
output = output.decode('utf-8')
if use_regexp:
if not re.match(result, output):
assert result == output
Expand Down

0 comments on commit 6d17d28

Please sign in to comment.