Coverage for python/lsst/resources/mem.py: 100%
8 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-15 02:25 -0700
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-15 02:25 -0700
1# This file is part of lsst-resources.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# Use of this source code is governed by a 3-clause BSD-style
10# license that can be found in the LICENSE file.
12from typing import Tuple
14__all__ = ("InMemoryResourcePath",)
16from ._resourcePath import ResourcePath
19class InMemoryResourcePath(ResourcePath):
20 """Internal in-memory datastore URI (`mem://`).
22 Not used for any real purpose other than indicating that the dataset
23 is in memory.
24 """
26 def exists(self) -> bool:
27 """Test for existence and always return False."""
28 return True
30 def _as_local(self) -> Tuple[str, bool]:
31 raise RuntimeError(f"Do not know how to retrieve data for URI '{self}'")