Skip to content

Commit cdab915

Browse files
committed
fix Issue #13
1 parent ff1064a commit cdab915

3 files changed

Lines changed: 24 additions & 6 deletions

File tree

pylode/pylode.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@
5151
padding-top: 7px;
5252
}
5353

54-
#metadata ul.pylodelitlist,
55-
#classes ul.pylodelitlist {
54+
ul.pylodelitlist {
5655
list-style-type: none;
56+
margin-left: -40px;
5757
}
5858

5959
#metadata ul li,
6060
#classes ul li {
61-
margin-left: -40px;
6261
margin-bottom: 10px;
6362
}
6463

tests/data/issues.ttl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ wfprov:describedByProcess
6363
rdfs:domain wfprov:ProcessRun ;
6464
rdfs:isDefinedBy ont: ;
6565
rdfs:range wfdesc:Process ;
66-
schema:description "This object property associate a wfprov:Processrun to its wfdesc:Process description ." ;
66+
schema:description
67+
"This object property associate a wfprov:Processrun to its wfdesc:Process description." ,
68+
"Second annoying description for Issue #13 testing" ;
6769
schema:name "described by process" ;
6870
.
6971

tests/test_issues.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
sys.path.append(str(Path().parent.parent.resolve() / "pylode"))
55
import pytest
6-
from rdflib import Literal, URIRef
7-
from rdflib.namespace import DCTERMS, RDFS, XSD
86

97
from pylode.profiles import OntPub
108
from pylode.utils import get_ns, de_space_html
@@ -25,6 +23,23 @@ def fix_html():
2523
return od.make_html()
2624

2725

26+
def test_issue_13(fix_html):
27+
"""
28+
Tests that multiple literals for the same predicate, e.g. schema:description, are concatenated nicely
29+
"""
30+
expected_html = de_space_html("""
31+
<td>
32+
<ul class="pylodelitlist">
33+
<li><p>This object property associate a wfprov:Processrun to its wfdesc:Process description.</p></li>
34+
<li><p>Second annoying description for Issue #13 testing</p></li>
35+
</ul>
36+
</td>
37+
""")
38+
39+
# open("issues.html", "w").write(fix_html)
40+
assert expected_html in de_space_html(fix_html)
41+
42+
2843
def test_issue_20(fix_html):
2944
"""
3045
Tests that the HTML fragments match the case of RDF elements, e.g. wfprov:describedByParameter
@@ -58,3 +73,5 @@ def test_issue_30_html(fix_html):
5873
)
5974
# open("issues.html", "w").write(de_space_html(fix_html))
6075
assert expected_html in de_space_html(fix_html)
76+
77+

0 commit comments

Comments
 (0)