mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-03 20:42:49 -05:00
[cache] Align further with yt-dlp
* use compat_os_makedirs * support non-ASCII characters in cache key * improve logging
This commit is contained in:
@ -63,7 +63,7 @@ class TestCache(unittest.TestCase):
|
||||
obj = {'x': 1, 'y': ['ä', '\\a', True]}
|
||||
c.store('test_cache', 'k.', obj)
|
||||
self.assertEqual(c.load('test_cache', 'k.', min_ver='1970.01.01'), obj)
|
||||
new_version = '.'.join(('%d' % ((v + 1) if i == 0 else v, )) for i, v in enumerate(version_tuple(__version__)))
|
||||
new_version = '.'.join(('%0.2d' % ((v + 1) if i == 0 else v, )) for i, v in enumerate(version_tuple(__version__)))
|
||||
self.assertIs(c.load('test_cache', 'k.', min_ver=new_version), None)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user