Skip to content

Refactor graph tests#3674

Merged
pascalfleury merged 4 commits intoschemaorg:mainfrom
pascalfleury:graph-tests
Oct 8, 2024
Merged

Refactor graph tests#3674
pascalfleury merged 4 commits intoschemaorg:mainfrom
pascalfleury:graph-tests

Conversation

@pascalfleury
Copy link
Contributor

@pascalfleury pascalfleury commented Oct 8, 2024

This refactors and simplifies the graph unit tests and exposes mroe useful information in the failure message.
It also reformats the file, exposing two tests that were hidden because of indentation.
The tests failed, so they were fixes too.

Because if wrong Python indentation, some tests were failing. This
re-enables them and ensures they pass. This also fixes some typos in
the way 'supersededBy' was written in some cases.
if pattern:
lines = [pattern % row for row in results]
else:
lines = [sep.join([row[key]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick, you could just make a generator here, i.e.

lines = (…)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@pascalfleury pascalfleury merged commit 1b57c92 into schemaorg:main Oct 8, 2024
@pascalfleury pascalfleury deleted the graph-tests branch October 8, 2024 14:41
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