Skip to content

Commit

Permalink
Fix tests on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
laraross committed Sep 28, 2015
1 parent 51a07f2 commit ef956a6
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 24 deletions.
23 changes: 5 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
language: ruby
rvm:
- 2.1.1
install:
- gem install sass --version 3.2.19
- gem install jekyll
- gem install jekyll-sitemap
- gem install s3_website
- gem install compass --version 0.12.5
- gem install kramdown
- gem install link-checker
language: python
python:
- "2.7"
install: "pip install -r requirements.txt"
before_script:
- python scripts/insert_demo.py
- cd site
script:
- jekyll build
after_success:
- s3_website push
- check-links 'http://prose.lifelinter.com'
- cd ..
script: nosetests
env:
global:
- secure: cB2hODqR9V3P8c2BupySJnz825snT2vqhpB4RnnyYD5L1E+nzZK9KdApgx0U/f1YHZujhPnbdXAfq1QQztIf6EocbF1CrSKPCavJoJ/CSQ53X775++PegBZXL66PSYfMX28MFcuYCvqcBxSKX26kpT72IjtgHHEROz/NkrifHog=
Expand Down
2 changes: 1 addition & 1 deletion proselint/checks/garner/a_vs_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""
import re
from tools import memoize
from proselint.tools import memoize
import os
import nltk

Expand Down
2 changes: 1 addition & 1 deletion proselint/checks/garner/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Dates.
"""
from tools import existence_check, memoize
from proselint.tools import existence_check, memoize
import calendar


Expand Down
2 changes: 1 addition & 1 deletion proselint/checks/wallace/uncomparables.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
attention and expects you to have done the same.
"""
import re
from tools import memoize
from proselint.tools import memoize
import itertools


Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Tests for proselint."""
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def check(self, lst):

return len(errors[0]) == 0

def test_wpe(self):
def wpe_too_high(self):
"""Check whether the check is too noisy."""
min_wpe = 50

Expand All @@ -44,7 +44,7 @@ def test_wpe(self):
with codecs.open(example_path, "r", encoding='utf-8') as f:
text = f.read()
num_errors = len(self.this_check.check(text))
num_words = len(text.words)
num_words = len(text)

try:
wpe = 1.0 * num_words / num_errors
Expand Down
2 changes: 1 addition & 1 deletion tests/test_topic_detector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tools import topics
from proselint.tools import topics


class TestTopicDetector(object):
Expand Down

0 comments on commit ef956a6

Please sign in to comment.