Skip to content

Commit

Permalink
Add cached_property tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TomFryers committed Jun 24, 2021
1 parent fc8a1d4 commit caf8f42
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/tests/test_cases/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# No docstring, so we can test D100
from functools import wraps
import functools
from functools import cached_property, wraps
import os
from .expected import Expectation
from typing import overload
Expand Down Expand Up @@ -47,6 +48,16 @@ def foo(self):
"""The foo of the thing, which isn't in imperitive mood."""
return "hello"

@cached_property
def bar(self):
"""The bar of the thing, which also isn't in imperitive mood."""
return "bye"

@functools.cached_property
def foobar(self):
"""The foobar of the thing; not in imperitive mood."""
return "hello again"

@expect('D102: Missing docstring in public method')
def __new__(self=None):
pass
Expand Down

0 comments on commit caf8f42

Please sign in to comment.