Author sobolevn
Recipients sobolevn
Date 2022-01-14.17:57:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642183054.5.0.671843875323.issue46380@roundup.psfhosted.org>
In-reply-to
Content
Right now there are two tests in Lib/test/test_functools.py that use `functools.lru_cache` directly:
1. https://github.com/python/cpython/blame/73140de97cbeb01bb6c9af1da89ecb9355921e91/Lib/test/test_functools.py#L1417
2. https://github.com/python/cpython/blame/73140de97cbeb01bb6c9af1da89ecb9355921e91/Lib/test/test_functools.py#L1429

But, I don't think it is correct. Why?

```python
class TestLRUPy(TestLRU, unittest.TestCase):
    module = py_functools

class TestLRUC(TestLRU, unittest.TestCase):
    module = c_functools
```

Source: https://github.com/python/cpython/blame/73140de97cbeb01bb6c9af1da89ecb9355921e91/Lib/test/test_functools.py#L1798-L1823

So, what can we do?

1. Use `self.module.lru_cache` instead (I think it is the right way)
2. Move them to `TestLRUPy`, but I don't think they should be python-specific
History
Date User Action Args
2022-01-14 17:57:34sobolevnsetrecipients: + sobolevn
2022-01-14 17:57:34sobolevnsetmessageid: <1642183054.5.0.671843875323.issue46380@roundup.psfhosted.org>
2022-01-14 17:57:34sobolevnlinkissue46380 messages
2022-01-14 17:57:34sobolevncreate