def test_fs_delete_at_uri(self): """Test that clear bucket utility works""" checkpoint = self._prepare_fs_checkpoint() # Convert into dict checkpoint location = checkpoint.to_uri(self.cloud_uri) delete_at_uri(location) checkpoint = Checkpoint.from_uri(location) with self.assertRaises(FileNotFoundError): checkpoint.to_directory()
def test_fs_checkpoint_uri_pa(self): """Test conversion from fs to cloud checkpoint and back.""" checkpoint = self._prepare_fs_checkpoint() # Clean up mock bucket delete_at_uri(self.cloud_uri_pa) _ensure_directory(self.cloud_uri_pa) # Convert into dict checkpoint location = checkpoint.to_uri(self.cloud_uri_pa) self.assertIsInstance(location, str) self.assertIn("mock://", location) # Create from dict checkpoint = Checkpoint.from_uri(location) self.assertTrue(checkpoint._uri) self._assert_fs_checkpoint(checkpoint)
def delete_external_checkpoint(checkpoint_uri: str): delete_at_uri(checkpoint_uri)