aboutsummaryrefslogtreecommitdiffstats
path: root/test/extractor/image
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-03-04 13:41:13 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-03-04 13:41:13 +0100
commitd2052e77210e0ace2c5f06e48afe2a8acb412965 (patch)
treef8e58256a6e309f7cabcd2112e59a9d9c659f375 /test/extractor/image
parent2f0f28a0c5490f53e71e55a3bc4667bbeeae49b1 (diff)
downloadbsie-d2052e77210e0ace2c5f06e48afe2a8acb412965.tar.gz
bsie-d2052e77210e0ace2c5f06e48afe2a8acb412965.tar.bz2
bsie-d2052e77210e0ace2c5f06e48afe2a8acb412965.zip
namespace refactoring and cleanup
Diffstat (limited to 'test/extractor/image')
-rw-r--r--test/extractor/image/test_colors_spatial.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/extractor/image/test_colors_spatial.py b/test/extractor/image/test_colors_spatial.py
index 967aaf2..902ab6d 100644
--- a/test/extractor/image/test_colors_spatial.py
+++ b/test/extractor/image/test_colors_spatial.py
@@ -19,8 +19,8 @@ from bsie.extractor.image.colors_spatial import ColorsSpatial
class TestColorsSpatial(unittest.TestCase):
def setUp(self):
# content id with default constructors (width=32, height=32, exp=4)
- self.instance_prefix = 'http://ie.bsfs.ai/schema/Feature/ColorsSpatial'
- self.predicate_prefix = 'http://bsfs.ai/schema/Entity/colors_spatial'
+ self.instance_prefix = 'https://schema.bsfs.io/ie/Literal/Array/Feature/ColorsSpatial'
+ self.predicate_prefix = 'https://schema.bsfs.io/ie/Node/Entity#colors_spatial_'
self.uuid = 'adee8d6c43687021e1c5bffe56bcfe727f1638d792744137181304ef889dac2a'
def test_essentials(self):
@@ -50,7 +50,7 @@ class TestColorsSpatial(unittest.TestCase):
def test_schema(self):
schema = bsfs.schema.from_string(base.SCHEMA_PREAMBLE + f'''
- <{self.instance_prefix}> rdfs:subClassOf bsfs:Feature ;
+ <{self.instance_prefix}> rdfs:subClassOf bsa:Feature ;
# annotations
rdfs:label "Spatially dominant colors"^^xsd:string ;
schema:description "Domiant colors of subregions in an image."^^xsd:string ;
@@ -63,8 +63,8 @@ class TestColorsSpatial(unittest.TestCase):
<{self.instance_prefix}/args#height> "32"^^xsd:integer ;
<{self.instance_prefix}/args#exp> "4"^^xsd:float .
- <{self.predicate_prefix}#{self.uuid}> rdfs:subClassOf bsfs:Predicate ;
- rdfs:domain bsfs:File ;
+ <{self.predicate_prefix}{self.uuid}> rdfs:subClassOf bsfs:Predicate ;
+ rdfs:domain bsn:Entity ;
rdfs:range <{self.instance_prefix}#{self.uuid}> ;
bsfs:unique "true"^^xsd:boolean .
''')
@@ -73,7 +73,7 @@ class TestColorsSpatial(unittest.TestCase):
def test_extract(self):
ext = ColorsSpatial(2,2,2)
img = PIL.Image.open(os.path.join(os.path.dirname(__file__), 'testimage.jpg'))
- node = _node.Node(ns.bsfs.Entity, bsfs.URI('http://example.com/entity#1234'))
+ node = _node.Node(ns.bsn.Entity, bsfs.URI('http://example.com/entity#1234'))
principals = set(ext.principals)
self.assertEqual(len(principals), 1)
# valid invocation yields feature