8000
Skip to content

ci: re-enable pytest, splitting offline tests from live ones - #2861

Open
dokson wants to merge 1 commit into
ranaroussi:devfrom
dokson:ci/re-enable-pytest-split
Open

ci: re-enable pytest, splitting offline tests from live ones#2861
dokson wants to merge 1 commit into
ranaroussi:devfrom
dokson:ci/re-enable-pytest-split

Conversation

@dokson
@dokson dokson commented Jun 14, 2026
Copy link
Copy Markdown
Contributor

The pytest workflow was disabled because almost every test fetches from Yahoo and live fetches fail intermittently on CI IPs (JSONDecodeError on empty/throttled bodies). But 69 of 255 tests are offline unit tests that never touch the network: tests/conftest.py now marks the live ones network, so PRs run pytest -m "not network" (fast, deterministic) while the live suite moves to a scheduled job (pytest-network.yml, plus workflow_dispatch). data.py additionally retries empty 200 bodies (the throttling failure mode) under the existing retries config, which tests/context.py enables for the test run.

Rebased onto current dev: the live job keeps the uv setup and the version matrix from the disabled workflow, and the cache and price-repair tests each get their own step so their global state and their flakiness stay isolated. The network marker is registered in pyproject.toml next to testpaths.

Worth flagging: the inherited matrix includes 3.6-3.9, where uv python install has no builds for 3.6/3.7 and pytest>=9.0.3 from the dev extra needs 3.10+. Those legs will fail regardless of this PR; fail-fast: false keeps the others running.

Closes #2261

@dokson
dokson force-pushed the ci/re-enable-pytest-split branch from 2fc4351 to 99d52df Compare June 14, 2026 22:01
@ValueRaider
Copy link
Copy Markdown
Collaborator

Solved by #2849?

@etbala
etbala commented Aug 1, 2026
Copy link
Copy Markdown
Contributor

#2849 didn't solve it, just modified the disabled file to use uv and test multiple python versions. This PR will need to rebase and integrate into that workflow.

@dokson
dokson force-pushed the ci/re-enable-pytest-split branch 2 times, most recently from 4ebdfe3 to 6ea50bc Compare August 13, 2026 13:58
The pytest workflow was disabled because almost every test fetches from
Yahoo and live fetches fail intermittently on CI IPs. But 60 of 211 tests
are offline unit tests that never touch the network; conftest.py auto-marks
the live ones `network`, so PRs run `pytest -m "not network"` while the live
suite moves to a scheduled job. data.py also retries empty 2xx bodies (the
throttling failure mode) under the existing `retries` config, enabled for
tests in context.py.
@dokson
dokson force-pushed the ci/re-enable-pytest-split branch from 6ea50bc to abba9ff Compare August 13, 2026 14:14
@dokson
dokson commented Aug 13, 2026
Copy link
Copy Markdown
Contributor Author

Rebased @etbala @ValueRaider

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.

3 participants

0