tkem/cachetools

On tests disproportion

Opened this issue · 2 comments

The keys.hashkey and the keys.typedkey decorators have both unit and functional tests.

But the keys.methodkey decorator has functional tests only.

tkem commented

I'll look into that ASAP (whatever that may mean).

I meant there are no tests such as these for key.methodkey:

def test_hashkey(self, key=cachetools.keys.hashkey):
    self.assertEqual(key(), key())
    self.assertEqual(hash(key()), hash(key()))
    self.assertEqual(key(1, 2, 3), key(1, 2, 3))
    ...

Feel free to ask questions :)