| 1 |
#!/usr/bin/env python |
| 2 |
|
| 3 |
"""Test GMEU entry 'a', part B.""" |
| 4 |
|
| 5 |
|
| 6 |
from proselint.tools import assert_error |
| 7 |
|
| 8 |
from tests.check import Check |
| 9 |
|
| 10 |
|
| 11 |
class chk: |
| 12 |
def check(self, text): |
| 13 |
return assert_error, text, "misc.a_distributive" |
| 14 |
|
| 15 |
|
| 16 |
class TestCheck(Check): |
| 17 |
"""The test class for GMEU entry A - using a over per in the distributive |
| 18 |
sense. |
| 19 |
""" |
| 20 |
|
| 21 |
@property |
| 22 |
def this_check(self): |
| 23 |
return chk |
| 24 |
|
| 25 |
def test_smoke(self): |
| 26 |
sentences = [ |
| 27 |
"An apple per day keeps the doctor away.", |
| 28 |
"I sleep eight hours per night.", |
| 29 |
"Their policy allows one golf cart a couple.", |
| 30 |
"The company donated five books a student.", |
| 31 |
"Our a-unit cost is less than $1000.", |
| 32 |
"The $50-a-parent fee seems unreasonably high." |
| 33 |
] |
| 34 |
for sentence in sentences: |
| 35 |
assert not self.passes(sentence) |