예제 #1
0
    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.") != []
예제 #2
0
    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.") != []
예제 #3
0
 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
예제 #4
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