-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more tests, all modules from C to L except links
- Loading branch information
1 parent
3b164d1
commit b15f8c5
Showing
12 changed files
with
317 additions
and
3 deletions.
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
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,22 @@ | ||
"""Tests for cursing.filth check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.cursing import filth as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for cursing.filth.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for cursing.filth.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert not self.passes("""Bad shit in this phrase.""") |
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,22 @@ | ||
"""Tests for cursing.nfl check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.cursing import nfl as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for cursing.nfl.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for cursing.nfl.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert not self.passes("""The QB is named ball licker.""") |
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,22 @@ | ||
"""Tests for cursing.nword check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.cursing import nword as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for cursing.nword.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for cursing.nword.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert not self.passes("""The n-word.""") |
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,73 @@ | ||
"""Tests for dates_times.am_pm check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.dates_times import am_pm as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for dates_times.am_pm.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke_check_lowercase_periods(self): | ||
"""Basic smoke test. | ||
This is for the function | ||
dates_times.am_pm.check_lowercase_periods. | ||
""" | ||
assert chk.check_lowercase_periods( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_lowercase_periods( | ||
"It happened at 7 a.m.") == [] | ||
assert chk.check_lowercase_periods( | ||
"It happened at 7 am.") != [] | ||
|
||
def test_smoke_check_spacing(self): | ||
"""Basic smoke test. | ||
This is for the function | ||
dates_times.am_pm.check_spacing. | ||
""" | ||
assert chk.check_spacing( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_spacing( | ||
"It happened at 7 a.m.") == [] | ||
assert chk.check_spacing( | ||
"It happened at 7a.m.") != [] | ||
|
||
def test_smoke_check_midnight_noon(self): | ||
"""Basic smoke test. | ||
This for the function | ||
dates_times.am_pm.midnight_noon. | ||
""" | ||
assert chk.check_midnight_noon( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_midnight_noon( | ||
"It happened at noon.") == [] | ||
assert chk.check_midnight_noon( | ||
"It happened at 12 a.m.") != [] | ||
|
||
def test_smoke_check_redundancy(self): | ||
"""Basic smoke test. | ||
This for the function | ||
dates_times.am_pm.check_redundancy. | ||
""" | ||
assert chk.check_redundancy( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_redundancy( | ||
"It happened at 7 a.m.") == [] | ||
assert chk.check_redundancy( | ||
"It happened at 7a.m. in the morning.") != [] |
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,87 @@ | ||
"""Tests for dates_times.dates check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.dates_times import dates as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for dates_times.dates.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke_check_decade_apostrophes_short(self): | ||
"""Basic smoke test. | ||
This for the function | ||
dates_times.dates.check_decade_apostrophes_short. | ||
""" | ||
assert chk.check_decade_apostrophes_short( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_decade_apostrophes_short( | ||
"It happened the 90s.") == [] | ||
assert chk.check_decade_apostrophes_short( | ||
"It happened at 90's.") != [] | ||
|
||
def test_smoke_check_decade_apostrophes_long(self): | ||
"""Basic smoke test. | ||
This is for the function | ||
dates_times.dates.decade_apostrophes_long. | ||
""" | ||
assert chk.check_decade_apostrophes_long( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_decade_apostrophes_long( | ||
"It happened in the 1980s.") == [] | ||
assert chk.check_decade_apostrophes_long( | ||
"It happened in the 1980's.") != [] | ||
|
||
def test_smoke_check_dash_and_from(self): | ||
"""Basic smoke test. | ||
This for the function | ||
dates_times.dates.dash_and_from. | ||
""" | ||
assert chk.check_dash_and_from( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_dash_and_from( | ||
"It happened from 2000 to 2005.") == [] | ||
assert chk.check_dash_and_from( | ||
"It happened from 2000-2005.") != [] | ||
|
||
def test_smoke_check_month_year_comma(self): | ||
"""Basic smoke test. | ||
This is for the function | ||
dates_times.dates.check_month_year_comma. | ||
""" | ||
assert chk.check_month_year_comma( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_month_year_comma( | ||
"It happened in August 2008.") == [] | ||
assert chk.check_month_year_comma( | ||
"It happened in August, 2008.") != [] | ||
|
||
def test_smoke_check_month_of_year(self): | ||
"""Basic smoke test. | ||
This is for the function | ||
dates_times.dates.check_month_of_year. | ||
""" | ||
assert chk.check_month_of_year( | ||
"Basic smoke phrase without issues.") == [] | ||
assert chk.check_month_of_year( | ||
"It happened in August 2008.") == [] | ||
assert chk.check_month_of_year( | ||
"It happened in August of 2008.") != [] |
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,22 @@ | ||
"""Tests for hedging.misc check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.hedging import misc as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for hedging.misc.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for hedging.misc.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert not self.passes("""I would argue that this is a good test.""") |
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,22 @@ | ||
"""Tests for hyperbole.misc check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.hyperbole import misc as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for hyperbole.misc.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for hyperbole.misc.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert not self.passes("""So exaggerated!!!""") |
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,22 @@ | ||
"""Tests for jargon.misc check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.jargon import misc as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for jargon.misc.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for jargon.misc.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert not self.passes("""I agree it's in the affirmative.""") |
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,22 @@ | ||
"""Tests for lexical_illusions.misc check.""" | ||
from __future__ import absolute_import | ||
|
||
from .check import Check | ||
|
||
from proselint.checks.lexical_illusions import misc as chk | ||
|
||
|
||
class TestCheck(Check): | ||
"""The test class for lexical_illusions.misc.""" | ||
|
||
__test__ = True | ||
|
||
@property | ||
def this_check(self): | ||
"""Bolierplate.""" | ||
return chk | ||
|
||
def test_smoke(self): | ||
"""Basic smoke test for lexical_illusions.misc.""" | ||
assert self.passes("""Smoke phrase with nothing flagged.""") | ||
assert not self.passes("""Paris in the the springtime.""") |