Skip to content

Commit

Permalink
Update test_typing.py
Browse files Browse the repository at this point in the history
  • Loading branch information
millsks authored Jan 10, 2025
1 parent 2703d4f commit 2827077
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ibis/tests/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@

from ibis.common.typing import get_type_hints


class TestClass:
a: int

@property
def b(self) -> str:
return "test"

Check warning on line 13 in ibis/tests/test_typing.py

View check run for this annotation

Codecov / codecov/patch

ibis/tests/test_typing.py#L13

Added line #L13 was not covered by tests

@property
def c(self) -> Any:
raise AttributeError("Property 'c' raises AttributeError")

Check warning on line 17 in ibis/tests/test_typing.py

View check run for this annotation

Codecov / codecov/patch

ibis/tests/test_typing.py#L17

Added line #L17 was not covered by tests


def test_get_type_hints_with_attribute_error():
hints = get_type_hints(TestClass, include_properties=True)
assert hints == {"a": int, "b": str}

Check warning on line 22 in ibis/tests/test_typing.py

View check run for this annotation

Codecov / codecov/patch

ibis/tests/test_typing.py#L21-L22

Added lines #L21 - L22 were not covered by tests

0 comments on commit 2827077

Please sign in to comment.