How to use the proselint.checks.dates_times.dates.check_dash_and_from function in proselint

To help you get started, we’ve selected a few proselint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amperser / proselint / tests / test_dates_times_dates.py View on Github external
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.") != []
github amperser / proselint / tests / test_dates_times_dates.py View on Github external
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.") != []
github amperser / proselint / tests / test_garner_dates.py View on Github external
def test_dash_and_from(self):
        """Test garner.check_dash_and_from."""
        text = """From 1999-2002, Sally served as chair of the committee."""
        errors = dates.check_dash_and_from(text)
        print(errors)
        assert len(errors) == 1
github amperser / proselint / tests / test_dates_times_dates.py View on Github external
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.") != []