File: test_store.py

package info (click to toggle)
rdflib 6.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,248 kB
  • sloc: python: 39,216; sh: 153; makefile: 110
file content (25 lines) | stat: -rw-r--r-- 713 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import unittest
from rdflib import Graph
from rdflib.store import Store
from rdflib.namespace import NamespaceManager


class TestAbstractStore(unittest.TestCase):
    def test_namespaces(self):
        """
        This tests that Store.namespaces is an empty generator.
        """
        store = Store()
        self.assertEqual(list(store.namespaces()), [])

    def test_namespaces_via_manager(self):
        """
        This tests that NamespaceManager.namespaces works correctly with an
        abstract Store.
        """
        namespace_manager = NamespaceManager(Graph(store=Store()))
        self.assertEqual(list(namespace_manager.namespaces()), [])


if __name__ == "__main__":
    unittest.main()