mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-05 20:41:47 -07: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:
parent
add4622870
commit
cedeeed56f
2 changed files with 41 additions and 31 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue