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

Fix ignored test cases #559

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix ignored test cases #559

wants to merge 2 commits into from

Conversation

SuibianP
Copy link

Tests under this class seem not to be run due to pytest discovery rules, which requires classes to be prefixed with Test.

This also seems to be hiding potential problems with non-PostgreSQL database systems.

Tests under this class seem not to be run due to pytest discovery rules, which requires classes to be prefixed with Test.

This also seems to be hiding potential problems with non-PostgreSQL database systems.
Copy link
Collaborator

@kurtmckee kurtmckee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestDateRangeOnPostgres inherits from DateRangeTestCase.

https://github.com/SuibianP/sqlalchemy-utils/blob/patch-1/tests/types/test_date_range.py#L87

The class name needs to change in both places.

@SuibianP SuibianP requested a review from kurtmckee April 18, 2022 14:27
@kurtmckee
Copy link
Collaborator

@SuibianP, thanks for your work on this. You were right -- making the tests discoverable has indeed revealed some issues. For posterity, here's the output from one of the failing tests on Python 3.7:

AttributeError("'DateInterval' object has no attribute 'lower_inc'")

Is this something you're comfortable debugging and resolving as a part of this PR?

(By the way, the Python 3.6 deprecation failures are resolved in the most recent commits. If you rebase those should disappear and let you run the tests in Python 3.6.)

@SuibianP
Copy link
Author

SuibianP commented Apr 30, 2022

@kurtmckee This issue roots from kvesteri/intervals#49, and will be automatically solved by bumping the dependency version once that PR is merged.

On a separate note, the practice of de/serialising with __str__ and the constructor is presumably fragile by nature IMHO…

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.

2 participants