From 58aaa864f9747d27c065739256d4c6635ca9b751 Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Mon, 16 Jan 2023 21:36:50 +0100 Subject: minor fixes --- test/extractor/image/test_colors_spatial.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test/extractor') diff --git a/test/extractor/image/test_colors_spatial.py b/test/extractor/image/test_colors_spatial.py index d8a4209..ba551f3 100644 --- a/test/extractor/image/test_colors_spatial.py +++ b/test/extractor/image/test_colors_spatial.py @@ -57,8 +57,9 @@ class TestColorsSpatial(unittest.TestCase): schema = bsfs.schema.from_string(base.SCHEMA_PREAMBLE + f''' <{self.instance_prefix}> rdfs:subClassOf bsfs:Feature ; # annotations - rdfs:label ""^^xsd:string ; - schema:description ""^^xsd:string . + rdfs:label "Spatially dominant colors"^^xsd:string ; + schema:description "Domiant colors of subregions in an image."^^xsd:string ; + bsfs:dtype xsd:integer . <{self.instance_prefix}#{self.uuid}> rdfs:subClassOf <{self.instance_prefix}> ; bsfs:dimension "3276"^^xsd:integer ; @@ -80,11 +81,15 @@ class TestColorsSpatial(unittest.TestCase): node = _node.Node(ns.bsfs.Entity, bsfs.URI('http://example.com/entity#1234')) principals = set(ext.principals) self.assertEqual(len(principals), 1) + # valid invocation yields feature ret = list(ext.extract(node, img, principals)) self.assertEqual(ret[0], ( node, list(principals)[0], (91, 127, 121, 94, 138, 167, 163, 134, 190, 138, 170, 156, 121, 142, 159))) + # principals is respected + self.assertListEqual(list(ext.extract(node, img, {})), []) + ## main ## -- cgit v1.2.3