Skip to content

Disable network tests whose endpoints or data are gone; fix is_up - #114

Merged
ericprud merged 1 commit into
masterfrom
fix-network-tests
Oct 11, 2026
Merged

ericprud merged 1 commit into
masterfrom
fix-network-tests

Conversation

@ericprud

Copy link
Copy Markdown
Collaborator

CI runs with SKIP_EXTERNAL_URLS=true, so these only fail locally, but a full local run had 5 failures. For each I looked for an alternate source before disabling it.

Test What's wrong Alternatives tried
test_sparql_options::test_named_graph_types graphdb.dumontierlab.com/repositories/ncats-red-kg returns 502 none found; the expected output is specific to that knowledge graph
test_sparql_options::test_infer_setting graph.fhircat.org no longer has the fhirontology repository its 4 remaining repositories (test, test2, example2, ontest) have no Patient/pat4
test_fhir::test_observation_online hl7.org/fhir/observation-example-haplotype2.ttl is 404 R4 has the example, but R4's observation.shex and full fhir.shex reference undefined fhirpath shapes; R4B and STU3 schemas don't parse. The offline test_observation still covers this case.
test_reactome, test_diseases Live Wikidata items no longer conform to the 2018/2019 schemas Validated the 30 committed disease snapshots offline: shex.js and PyShEx agree (6 pass, 24 fail), so this is data drift, not a PyShEx regression

All five are now pytest.mark.skip with a reason.

is_up fix: it treated any HTTP response, including 502 and 404, as "up", which is why the dead GraphDB endpoints weren't auto-skipped. It now treats 5xx and 404 as down. is_down_reason() also always named the last pre-cached server rather than its argument.

Snapshot restore: #113 accidentally included 8 rewritten files under tests/test_issues/data/wikidata/disease/. A local run with network tests on overwrote them (the Wikidata tests save fetched graphs over the committed snapshots), and git commit -a picked them up. This restores them; nothing reads them.

Testing: full suite with SKIP_EXTERNAL_URLS=false: 451 passed, 70 skipped, 0 failed.

🤖 Generated with Claude Code

With SKIP_EXTERNAL_URLS off, five tests failed against external services:
- test_named_graph_types: graphdb.dumontierlab.com ncats-red-kg returns 502
- test_infer_setting: graph.fhircat.org has no fhirontology repository and
  no Patient/pat4 in any remaining repository
- test_observation_online: hl7.org dropped the haplotype2 example after R4;
  the R4/R4B/STU3 ShEx references undefined fhirpath shapes or won't parse
- test_wikidata_reactome, test_diseases: live Wikidata no longer fits the
  2018/2019 schemas; shex.js agrees with PyShEx on the saved snapshots

is_up() treated any HTTP response, including 502 and 404, as up, and
is_down_reason() named the last pre-cached server instead of its argument.

Also restores the Wikidata disease snapshots that c6ac2dc (#113)
accidentally committed after a local network test run overwrote them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ericprud
ericprud merged commit 992bcce into master Oct 11, 2026
29 of 30 checks passed
@ericprud
ericprud deleted the fix-network-tests branch October 11, 2026 06:18
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.

1 participant