forked from amperser/proselint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added more tests for coverage (amperser#584)
- Loading branch information
1 parent
190fbf0
commit a722420
Showing
6 changed files
with
118 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Tests for annotations.misc check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.annotations import misc as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for annotations.misc.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for annotations.misc.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert self.passes("""Add it to the to do list.""") | ||
assert not self.passes("""Add it to the TODO list.""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Tests for archaism.misc check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.archaism import misc as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for archaism.misc.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for archaism.misc.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert self.passes("""I want to sleep, and maybe dream.""") | ||
assert not self.passes("""I want to sleep, perchance to dream.""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Tests for consistency.spacing check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.consistency import spacing as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for consistency.spacing.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for consistency.spacing.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert self.passes( | ||
"""This is good. Only one space each time. Every time.""") | ||
assert not self.passes("""This is bad. Not consistent. At all.""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Tests for consistency.spelling check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.consistency import spelling as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for consistency.spelling.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for consistency.spelling.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert self.passes("""The centre for the arts is the art centre.""") | ||
assert self.passes("""The center for the arts is the art center.""") | ||
assert not self.passes("""The centre of the arts is the art center.""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Tests for corporate_speak.misc check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.corporate_speak import misc as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for corporate_speak.misc.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for corporate_speak.misc.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert self.passes("""We will discuss it later.""") | ||
assert not self.passes("""We will circle back around to it.""") |