Coverage for tests/test_mem.py: 52%
17 statements
« prev ^ index » next coverage.py v6.5.0, created at 2023-03-30 09:30 +0000
« prev ^ index » next coverage.py v6.5.0, created at 2023-03-30 09:30 +0000
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.
12import unittest
14from lsst.resources import ResourcePath
15from lsst.resources.tests import GenericTestCase
18class MemoryTestCase(GenericTestCase, unittest.TestCase):
19 scheme = "mem"
20 netloc = "unknown"
23class MemoryReadTestCase(unittest.TestCase):
24 def setUp(self):
25 self.root_uri = ResourcePath("mem://x/y.z")
27 def test_exists(self):
28 """Always exist."""
29 self.assertTrue(self.root_uri.exists())
31 def test_local(self):
32 with self.assertRaises(RuntimeError):
33 with self.root_uri.as_local():
34 pass
37if __name__ == "__main__": 37 ↛ 38line 37 didn't jump to line 38, because the condition on line 37 was never true
38 unittest.main()