Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails: test_cls_maxqc1 #41

Open
Aniket-Pradhan opened this issue Feb 26, 2021 · 0 comments
Open

Test fails: test_cls_maxqc1 #41

Aniket-Pradhan opened this issue Feb 26, 2021 · 0 comments

Comments

@Aniket-Pradhan
Copy link
Contributor

Aniket-Pradhan commented Feb 26, 2021

Hey all! I am trying to package OWL-RL for the Fedora OS and am struggling through one of the test cases that is failing (even in a virtual environment).

The test case is: test_cls_maxqc1 from test/test_classes.py. Below is the error log for the same.

def test_cls_maxqc1():
        """
        Test cls-maxqc1 rule for OWL 2 RL.
    
        If::
    
            T(?x, owl:maxQualifiedCardinality, "0"^^xsd:nonNegativeInteger)
            T(?x, owl:onProperty, ?p)
            T(?x, owl:onClass, ?c)
            T(?u, rdf:type, ?x)
            T(?u, ?p, ?y)
            T(?y, rdf:type, ?c)
    
        then::
    
            false
        """
        g = Graph()
    
        x = T.x
        p = T.p
        c = T.C
        u = T.u
        y = T.y
    
        g.add((x, OWL.maxQualifiedCardinality, Literal(0)))
        g.add((x, OWL.onProperty, p))
        g.add((x, OWL.onClass, c))
        g.add((u, p, y))
        g.add((y, RDF.type, c))
    
        owlrl.DeductiveClosure(owlrl.OWLRL_Semantics).expand(g)
>       result = next(g.objects(predicate=DAML.error))
E       StopIteration

test/test_classes.py:123: StopIteration

Now, from what I know, the variable g should be a generator object but it is apparently empty/exhausted. I am pretty sure that it should not be like that but am unable to figure out the root problem here.

I will be happy to help if needed. :D

My Python version is 3.9.1 and below are the versions of the installed deps.

attrs==20.3.0
iniconfig==1.1.1
isodate==0.6.0
owlrl==5.2.1
packaging==20.9
pluggy==0.13.1
py==1.10.0
pyparsing==3.0.0b2
pytest==6.2.2
rdflib==5.0.0
rdflib-jsonld==0.5.0
six==1.15.0
toml==0.10.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant