Browse Source

[test_cache] Add a dot in the file name

totalwebcasting
Philipp Hagemeister 10 years ago
parent
commit
5df921b0e3
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      test/test_cache.py

+ 5
- 5
test/test_cache.py View File

@ -43,16 +43,16 @@ class TestCache(unittest.TestCase):
}) })
c = Cache(ydl) c = Cache(ydl)
obj = {'x': 1, 'y': ['ä', '\\a', True]} obj = {'x': 1, 'y': ['ä', '\\a', True]}
self.assertEqual(c.load('test_cache', 'k'), None)
c.store('test_cache', 'k', obj)
self.assertEqual(c.load('test_cache', 'k.'), None)
c.store('test_cache', 'k.', obj)
self.assertEqual(c.load('test_cache', 'k2'), None) self.assertEqual(c.load('test_cache', 'k2'), None)
self.assertFalse(_is_empty(self.test_dir)) self.assertFalse(_is_empty(self.test_dir))
self.assertEqual(c.load('test_cache', 'k'), obj)
self.assertEqual(c.load('test_cache', 'k.'), obj)
self.assertEqual(c.load('test_cache', 'y'), None) self.assertEqual(c.load('test_cache', 'y'), None)
self.assertEqual(c.load('test_cache2', 'k'), None)
self.assertEqual(c.load('test_cache2', 'k.'), None)
c.remove() c.remove()
self.assertFalse(os.path.exists(self.test_dir)) self.assertFalse(os.path.exists(self.test_dir))
self.assertEqual(c.load('test_cache', 'k'), None)
self.assertEqual(c.load('test_cache', 'k.'), None)
if __name__ == '__main__': if __name__ == '__main__':


Loading…
Cancel
Save