| 1 |
#!/usr/bin/env python |
| 2 |
|
| 3 |
"""Test GMEU entry 'a', part A.""" |
| 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_vs_an" |
| 14 |
|
| 15 |
|
| 16 |
class TestCheck(Check): |
| 17 |
"""The test class for GMEU entry A - using the correct determiner.""" |
| 18 |
|
| 19 |
@property |
| 20 |
def this_check(self): |
| 21 |
return chk |
| 22 |
|
| 23 |
sentences_with_errors = [ |
| 24 |
"Are you an Yankee fan?", |
| 25 |
"Coffee tastes less sweet in an white mug.", |
| 26 |
"One of them wore a opalescent vest.", |
| 27 |
"You're a intelligent guy, often misguided.", |
| 28 |
"Ezra gave an eulogy.", |
| 29 |
"What capital of an European country is the farthest north?", |
| 30 |
"His sole reward was an one-year term as Ambassador to Thailand.", |
| 31 |
"I will be relying on a roulette wheel and an Ouija board.", |
| 32 |
"Anyone in an uniform is fair game.", |
| 33 |
"Grimm started working as a F.B.I. agent in 1995.", |
| 34 |
"Out of 186 managers participating, 57 had a MBA degree.", |
| 35 |
"Smith announced that a SEC filing is pending.", |
| 36 |
"This argument is an historical desecration.", |
| 37 |
"The treatment of crime in Britain shows an historic shift away…", |
| 38 |
"It is, in some ways, an humble form.", |
| 39 |
"The thief turned out to be an habitual offender from Darlington.", |
| 40 |
"This stage displays an hallucinatory image that signifies itself.", |
| 41 |
"He saw an hallucinatory image before passing out.", |
| 42 |
"A triumphant Adolf Hitler addressed an hysterical crowd.", |
| 43 |
"Kun pieced together an history of gender-segregated dining in L.A.", |
| 44 |
"An historian who fled the Nazis and still wants us to read Hitler.", |
| 45 |
"It is nominally an historical novel.", |
| 46 |
"It feels good to validate an hypothesis.", |
| 47 |
"An hereditary title can be passed to a member of the family.", |
| 48 |
"The Clinton Presidency was an historic era of prosperity.", |
| 49 |
"There comes to be an habitual pattern between neurons in the brain.", |
| 50 |
"They had the authority to start an humanitarian intervention.", |
| 51 |
"She laughed aloud, an hysterical sort of giggled, quickly stifled", |
| 52 |
] |
| 53 |
|
| 54 |
def test_smoke(self): |
| 55 |
for sentence in self.sentences_with_errors: |
| 56 |
assert not self.passes(sentence) |