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 in the 90s.") == [] assert chk.check_decade_apostrophes_short( "It happened in the 90's.") != []
def test_50_Cent_hyphenation(self): """Don't flag 50's when it refers to 50 Cent's manager.""" text = """ Dr. Dre suggested to 50's manager that he look into signing Eminem to the G-Unit record label. """ errors = dates.check_decade_apostrophes_short(text) assert len(errors) == 0
def test_50s_hyphenation(self): """Find unneeded hyphen in 50's.""" text = """The 50's were swell.""" errors = dates.check_decade_apostrophes_short(text) assert len(errors) == 1