Skip to content

Improve test coverage of the hand-written core #121

Description

@apdavison

Coverage is 88% overall with a KG connection, 85% without. Both are flattered by generated code:

statements with token
generated (fairgraph/openminds/) 6647 91.1%
hand-written 1993 77.2%

The generated classes are constructor and property boilerplate, exercised incidentally by any test that touches them. The hand-written core is where the logic and the risk are.

Comparing a run with a token against one without separates two different problems.

Untested, no KG required — identical in both runs, so straightforwardly addressable:

module coverage statements missed
collection.py 21% 57
base.py 62% 22
caching.py 62% 10
embedded.py 82% 9
registry.py 88% 8

That is 106 statements reachable with plain unit tests, collection.py being far the largest single win.

Connection-gated — much better with a token, so the gap is CI's lack of credentials rather than missing tests: client.py 38%→67%, kgquery.py 44%→84%, kgproxy.py 59%→78%, node.py 85%→93%. Some of this can be pulled onto the offline path with a mock client, as was done for space_info() in #119; the rest belongs with running the live suite in CI.

(fields.py reports 0% but is a three-line deprecation shim due for removal at 1.0.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskMaintenance, reduction of technical debt, software quality improvements, etc.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions