Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW: Removed old tests #67

Closed
wants to merge 5 commits into from
Closed

NEW: Removed old tests #67

wants to merge 5 commits into from

Conversation

akmalsoliev
Copy link
Contributor

example should cover majority of specific case scenarios that might of been skipped by given and that are present in the old test. It is designed as just in case scenario.

Code:

@given(
    start_date=st.dates(
        min_value=date(1960, 1, 1), max_value=date(2024, 12, 31)
    ),
    end_date=st.dates(min_value=date(1960, 1, 1), max_value=date(2024, 12, 31)),
)
@example(start_date=date(2022, 2, 28), end_date=date(2024, 2, 29))  # Leap year
@example(start_date=date(2024, 1, 1), end_date=date(2024, 1, 31))  # Same month
@example(start_date=date(1973, 1, 1), end_date=date(1973, 1, 1))  # Same date
@example(start_date=date(2019, 12, 31), end_date=date(2020, 1, 1))  # Border
@example(start_date=date(2018, 12, 1), end_date=date(2020, 1, 1))  # End of year
@example(start_date=date(2022, 12, 1), end_date=date(2020, 1, 1))  # Negative

example are the first tests, the total number of tests are 106 (100 given and 6 example)

start_date end_date month_delta
28/02/22 29/02/24 24
01/01/24 31/01/24 0
01/01/73 01/01/73 0
31/12/19 01/01/20 0
01/12/18 01/01/20 13
01/12/22 01/01/20 -35
01/01/00 01/01/00 0
01/01/67 01/01/00 396
15/11/67 17/04/86 221

@akmalsoliev
Copy link
Contributor Author

Covered in PR #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant