summaryrefslogtreecommitdiff
path: root/test/test_store.py
blob: d4d8d0a8ab86233dd2e241388d7fe2bf5cfee12c (plain)
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()