WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@bdrung
Copy link
Contributor

@bdrung bdrung commented Nov 13, 2025

Use range() to shorten test_sunday_ranges_to.

The other tests can be shortened as well. Example:

        self._test_sunday_ranges(
            "0 0 * * Thu-Sun",
            list(range(4, 8))
            + list(range(11, 15))
            + list(range(18, 22))
            + list(range(25, 29))
            + list(range(1, 4))
            + list(range(8, 12))
            + list(range(15, 19))
            + list(range(22, 23)),
        )

But I do not know if that is better to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant