def test_cache_exists(self):
    self.assertTrue(self.cached_task.cache_dir)
    self.cached_task.assert_cached()
    self.assertEqual(os.path.join(self.test_data_dir, 'cached_task'), self.cached_task.cache_dir)
    self.assertFalse(self.uncached_task.cache_dir)
    with self.assertRaisesWithLiteralMatch(AssertionError, "'tfds_task' does not exist in any of the task cache directories."):
        TaskRegistry.get('tfds_task').assert_cached()
def test_cache_exists(self):
    self.assertTrue(self.cached_task.cache_dir)
    self.cached_task.assert_cached()
    self.assertEqual(os.path.join(self.test_data_dir, 'cached_task'), self.cached_task.cache_dir)
    self.assertFalse(self.uncached_task.cache_dir)
    with self.assertRaisesWithLiteralMatch(AssertionError, "'tfds_task' does not exist in any of the task cache directories."):
        TaskRegistry.get('tfds_task').assert_cached()