pcgv3 refactor tests#538
Merged
Merged
Conversation
Add [tool.pytest.ini_options] with testpaths so a bare `pytest` collects the suite; test configuration previously lived only in the tox command. Co-Authored-By: Claude <noreply@anthropic.com>
The fixture duplicated gen_graph with file-backed edge/component I/O but had no callers. Co-Authored-By: Claude <noreply@anthropic.com>
Replace the duplicated `datetime.now(UTC) - timedelta(days=10)` with one helper so the "safely old" edit/lineage timestamp has a single source; rename local vars that collided with the helper name. Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## pcgv3 #538 +/- ##
==========================================
- Coverage 68.19% 67.66% -0.54%
==========================================
Files 90 89 -1
Lines 8899 8624 -275
Branches 1199 1149 -50
==========================================
- Hits 6069 5835 -234
+ Misses 2617 2600 -17
+ Partials 213 189 -24
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
A test graph is determined by its atomic chunks; build_graph takes only that topology and builds the full (derivable) parent hierarchy at one timestamp, replacing hand-listed add_parent_chunk scaffolding. Co-Authored-By: Claude <noreply@anthropic.com>
Supervoxels are named and given as SV(x, y, z, seg) with zeros defaulting away, so build specs carry no repeated raw coordinate tuples; build_graph returns a BuiltGraph(cg, sv, ts) namedtuple and callers reference sv by name.
Drop the unused ts from the result; callers unpack `cg, sv = build_graph(...)` and reference supervoxels by name.
Replace the per-fixture gen_graph + create_chunk + add_parent_chunk + to_label scaffolding with named-supervoxel build_graph specs. The parent hierarchy is derived from the atomic chunks rather than hand-listed, and readable SV() coordinates replace the repeated raw (x, y, z, seg) tuples. Co-Authored-By: Claude <noreply@anthropic.com>
Reference every node through readable SV coordinates — build_graph for setup, the new label(cg, SV, layer) for construction/encoding tests — instead of positional to_label tuples. Adds an assert_graph_unchanged context manager for rejected-edit atomicity; drops the dead query fixture. Co-Authored-By: Claude <noreply@anthropic.com>
Move the edit-operation tests into tests/graph/edits/ with a coverage README, and lift the duplicated split/merge/undo setup graphs into shared edits/conftest.py fixtures. Co-Authored-By: Claude <noreply@anthropic.com>
Restore the original finite affinity (a split test must exercise the same edge type); the migration had switched it to an inf cross-chunk edge. Co-Authored-By: Claude <noreply@anthropic.com>
Shrink the lock-acquire backoff where the failed acquire is only setup, lower the test lock-expiry, and skip the doomed best-effort error-artifact write that dominated the error-path test. Assertions unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
Every test parametrizes over kvdbclient_testing.backends(); the per-backend branches, the bigtable emulator bootstrap, and the hbase mock are gone, now shipped by kvdbclient. bootstrap() resolves the config class via get_config_class(). Requires kvdbclient>=0.8.0. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.