We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 248423b commit 93ac812Copy full SHA for 93ac812
1 file changed
tests/test_constants.py
@@ -247,8 +247,9 @@ class SuffixesPrefixesTitlesPerformanceTests(HumanNameTestBase):
247
248
def test_repeated_access_is_cached(self) -> None:
249
c = Constants()
250
- # Prime the cache with one access.
251
- _ = c.suffixes_prefixes_titles
+ first = c.suffixes_prefixes_titles
+ second = c.suffixes_prefixes_titles
252
+ assert first is second, "suffixes_prefixes_titles should return the same cached object on repeated access"
253
254
n = 10_000
255
elapsed = timeit.timeit(lambda: c.suffixes_prefixes_titles, number=n)
0 commit comments