Skip to content

Commit

Permalink
Allow inheritance in tests
Browse files Browse the repository at this point in the history
Closes #30.
  • Loading branch information
Jordan Suchow committed Jan 23, 2015
1 parent afd7fbf commit a90b9de
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 54 deletions.
18 changes: 0 additions & 18 deletions tests/check.py

This file was deleted.

1 change: 1 addition & 0 deletions tests/samples/test.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
The quick brown fox jumps over the lazy dog.
I used the hammer.
8 changes: 5 additions & 3 deletions tests/test_dfw_uncomparables.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from check import Check
from proselint.checks import dfw_uncomparables
from proselint.checks import dfw_uncomparables as chk


class TestCheck(Check):

__test__ = True

@property
def this_check(self):
return dfw_uncomparables
return chk

def test_sample_phrases(self):
assert not self.check(
Expand All @@ -15,5 +17,5 @@ def test_sample_phrases(self):

def test_linebreaks(self):
assert not self.check(
"""This sentence is very\n unique."""
"""This sentence is very\nunique."""
)
33 changes: 0 additions & 33 deletions tests/test_samples.py

This file was deleted.

21 changes: 21 additions & 0 deletions tests/test_strunk_white_eos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from check import Check
from proselint.checks import strunk_white_eos as chk


class TestCheck(Check):

__test__ = True

@property
def this_check(self):
return chk

def test_with_utilized(self):
assert self.check(
"""I use a hammer to drive nails into wood.."""
)

def test_no_utilized(self):
assert not self.check(
"""I utilize a hammer to drive nails into wood."""
)

0 comments on commit a90b9de

Please sign in to comment.