Skip to content

[#255] Split JSON-LD tests by API - #340

Merged
mielvds merged 9 commits into
masterfrom
codex/255-split-jsonld-tests
Sep 15, 2026
Merged

mielvds merged 9 commits into
masterfrom
codex/255-split-jsonld-tests

Conversation

@anatoly-scherbakov

Copy link
Copy Markdown
Collaborator

Part of #255; stacked on #339.

Replaces the combined JSON-LD test module with function-based modules grouped by public API.

Validation:

  • pytest tests/jsonld
  • pytest --ignore tests/test_manifests.py
  • make lint

@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
lib/pyld
   canon.py2901296%36, 47, 51, 55, 85–86, 530, 552, 616, 626, 680–681
   context_resolver.py103892%78, 137, 151, 197, 203–205, 229
   iri_resolver.py141398%311–312, 322
   jsonld.py250116493%252–256, 305, 342, 347, 357, 374–389, 425–426, 468, 476, 496, 504–505, 613–618, 701–702, 717–718, 781–786, 811–812, 827–828, 838–839, 865, 913, 927–928, 951–952, 994, 1001, 1008, 1076, 1101, 1123–1125, 1135–1138, 1153, 1176, 1188–1191, 1287, 1296–1299, 1319, 1348, 1381, 1385, 1419, 1436–1438, 1448–1450, 1493, 1512–1515, 1528, 1577, 1680–1687, 1714–1716, 1742–1745, 1921, 1959, 2265, 2396, 2405–2412, 2506, 2533, 2557, 2565, 3159, 3209, 3228, 3293, 3346, 3349, 3412, 3497, 3531, 3539, 3817, 3822, 3824, 4019–4021, 4170, 4233, 4472, 4760, 4892, 4926, 4955–4958, 4980–4981, 5164, 5228, 5255, 5329, 5331, 5349, 5447, 5496, 5728, 5730, 5769, 5771, 5780, 5922, 6050, 6137, 6257–6271, 6403, 6630, 6636–6640, 6679, 6682, 6772–6773, 6782
   util.py72396%43, 116, 136
lib/pyld/cli
   app.py44295%77, 80
   entry.py12375%9–11, 24
   input.py52198%57
lib/pyld/documentloader
   aiohttp.py712269%29–39, 68, 74, 86, 98–106, 118–121, 138, 153–156
   file.py36197%49
   requests.py52590%57, 71, 83–91
   requests_sqlite_cache.py25196%19
   scheme_directed.py15193%38
   type_directed.py15193%41
TOTAL378522794% 

Tests Skipped Failures Errors Time
1931 28 💤 0 ❌ 0 🔥 3m 5s ⏱️

@mielvds mielvds left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the action @anatoly-scherbakov ! May I suggest a slight scope change to this PR. In to_rdf, We have two nquads formatting styles mixed:

assert nquads == (
        '<http://example.com/s> <http://example.com/p> '
        '"1.0E21"^^<http://www.w3.org/2001/XMLSchema#double>  .\n\n'
    )

and

expected = """_:custom0 <http://example.org/p> _:custom1  .
_:custom1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a"^^<http://www.w3.org/2001/XMLSchema#string>  .
_:custom1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:custom2  .
_:custom2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b"^^<http://www.w3.org/2001/XMLSchema#string>  .
_:custom2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>  .

"""

Could we unify those to either one? This PR seems like the place to do this

Base automatically changed from 255-review-test-structure-1 to master September 14, 2026 19:44
@anatoly-scherbakov
anatoly-scherbakov force-pushed the codex/255-split-jsonld-tests branch from 2d97c41 to ca65470 Compare September 14, 2026 19:44
@anatoly-scherbakov

Copy link
Copy Markdown
Collaborator Author

Updated the complete exact N-Quads expectations in test_to_rdf.py to the named triple-quoted expected style, while retaining the sorted multiline comparisons, substring assertions, and existing TODOs. Focused tests and lint pass.

@mielvds
mielvds merged commit 1391ef4 into master Sep 15, 2026
18 checks passed
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

Successfully merging this pull request may close these issues.

2 participants