tests.sphinx.test_sphinx_matrix module¶
Tests for click_extra.sphinx.matrix.
Split in two halves: the dependency-light matrix-generation logic (git tag
walking, spec parsing, floor filtering) and the matrix Sphinx directive
that surfaces it. Both live under tests/sphinx/ because importing
click_extra.sphinx.matrix pulls in the Sphinx package; the sibling
conftest.py skips the whole tree when Sphinx or MyST-Parser is absent.
- tests.sphinx.test_sphinx_matrix.pytestmark = MarkDecorator(mark=Mark(name='skipif', args=(False,), kwargs={'reason': 'matrix generation walks git tags, so the whole module needs a git binary'}))¶
Skip the module when git is missing, instead of failing every test.
The sibling
conftest.pyskips the tree when Sphinx or MyST-Parser is absent. Git is the third thing this module needs, and the only one that is a binary rather than an import, so that guard cannot cover it.
- tests.sphinx.test_sphinx_matrix.MATRIX_MODULE = 'click_extra.sphinx.matrix'¶
Dotted path the PyPI lookup is patched through.
Importing the module object instead would put a
matrixname in scope, and ruff would then read every{matrix}fence in the fixtures as an f-string.
- tests.sphinx.test_sphinx_matrix.LABEL_DATE_RE = re.compile(' \\(\\d{4}-\\d{2}-\\d{2}\\)')¶
The first-release date a row label carries after its lower bound.
- tests.sphinx.test_sphinx_matrix.WIDGET_CORNER = '`proj` ↴ \\\\ `widget` →'¶
Top-left cell of a
projtable trackingwidget, backslash escaped.
- tests.sphinx.test_sphinx_matrix.offline_pypi(monkeypatch)[source]¶
Anchor every table on
uv.lock, with no call to PyPI.The fixtures track a made-up
widgetdependency, and a real project of that name on PyPI would move their columns. The tests of the PyPI anchor stub the lookup again with the releases they need.- Return type:
- tests.sphinx.test_sphinx_matrix.unreadable_pypi(monkeypatch)[source]¶
Make every PyPI lookup fail, over the read
offline_pypistubs.The lookup answers
requiredthe way the real one does: a required read raises, and any other read returns no release.- Return type:
- tests.sphinx.test_sphinx_matrix.git_repo(path)[source]¶
Initialize a bare-bones git repository at
path.Returns a
run(*args)helper executing commands in that working tree, so each fixture only spells out the commits and tags it cares about.
- tests.sphinx.test_sphinx_matrix.dated_tag(repo, tag, date)[source]¶
Commit the working tree of
repoondateand tag ittag.The dates decide when a range was superseded, which the undeclared cells of both axes read.
- Return type:
- tests.sphinx.test_sphinx_matrix.declare_python(repo, spec, *classifiers)[source]¶
Write a
pyproject.tomldeclaringrequires-pythonand classifiers.- Return type:
- tests.sphinx.test_sphinx_matrix.declare_widget(repo, spec)[source]¶
Write a
pyproject.tomlrequiringwidget{spec}.Picks whichever dialect can express the range: Poetry’s caret and tilde are not valid PEP 508, so they only ever appear in Poetry’s own table.
- Return type:
- tests.sphinx.test_sphinx_matrix.named_repo(path, pyproject)[source]¶
Tag one release in a git repository at
path, then leavepyprojectas its working-treepyproject.toml, or no such file forNone.The tagged file declares the Python support a matrix renders. The working-tree file is the one the default package label is read from.
- Return type:
- tests.sphinx.test_sphinx_matrix.table_cells(line)[source]¶
Split one line of a rendered GFM matrix into its stripped cells.
- tests.sphinx.test_sphinx_matrix.table_header(table)[source]¶
Return the header cells of a rendered GFM matrix, corner label first.
- tests.sphinx.test_sphinx_matrix.tagged_table_rows(table)[source]¶
Parse a rendered GFM matrix into
{row label: [cells…]}.Lets a test assert a whole row at once (spec, then the full
✅/❌vector) instead of probing the table for loose substrings. The key drops the first-release date of the label, since the fixtures tag their commits on the day the test runs.
- tests.sphinx.test_sphinx_matrix.test_python_versions_released_by_default_table()[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_versions_released_by_sorted_ascending()[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_versions_released_by_custom_table()[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_release_dates_shape()[source]¶
Every entry must be
X.Y→ ISO date string.- Return type:
- tests.sphinx.test_sphinx_matrix.synthetic_repo(tmp_path)[source]¶
Build a tiny git repo with two tagged commits declaring different Python support sets, so
python_matrix_groupssees an evolution.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_synthetic(synthetic_repo)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_returns_named_tuple(synthetic_repo)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_reads_a_tag_that_is_no_utf8(synthetic_repo)[source]¶
A tag name that does not decode as UTF-8 leaves the walk going.
The tag goes in
packed-refs: a loose ref is a file, and APFS refuses a file name that is no UTF-8.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_no_tags(tmp_path)[source]¶
A repo with no matching tags returns an empty list.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_version_floor(synthetic_repo)[source]¶
version_floordrops release tags below the bare version.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_ceiling_honored(tmp_path)[source]¶
A declared
<X.Yceiling excludes those versions from✅.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_keeps_declared_spec(synthetic_repo)[source]¶
Each group carries its raw
requires-pythonnext to the set it attests, since the two drive different cells.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_groups_respelled_floor_continues_range(tmp_path)[source]¶
Re-spelling a floor-only
requires-pythondoes not end its range.The range lasts until
2.0.0, after Python 3.11 and 3.12 came out, so its capped support includes both. Split at the re-spelling, its older half would end in June 2022, before 3.11, and read 3.10 alone.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_cell_spec_shapes(spec, version, expected)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_three_states(tmp_path)[source]¶
A release claiming less than its floor allows renders all three cells.
The classifiers stop at 3.11 while
requires-pythononly rules out everything under 3.10, so 3.12 is neither supported nor forbidden.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_synthetic(synthetic_repo)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_show_date(synthetic_repo, show_date)[source]¶
show_datefollows each row label with its first release date.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_column_order(synthetic_repo, column_order)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_row_order(synthetic_repo, row_order)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_invalid_order(synthetic_repo)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_python_floor(synthetic_repo)[source]¶
python_floortrims the low Python columns from the header.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_empty(tmp_path)[source]¶
An empty repo produces the empty string, matching the
if not groups: return ""early exit.- Return type:
- tests.sphinx.test_sphinx_matrix.split_floor_repo(tmp_path)[source]¶
A repo raising its Python floor in the
1.0.1patch release.The newest release supports 3.11 and later, and
1.0.0only 3.9, so the support envelope starts at1.0.1, inside the1.0minor series.- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_envelope(split_floor_repo)[source]¶
The ranges below the oldest one supporting the floor or a later Python go.
The oldest columns, which no remaining range supports, go with them.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_python_matrix_table_full_history(split_floor_repo)[source]¶
The full history keeps every range and every column.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_matrix_directive_full_history_option(sphinx_app_myst, split_floor_repo, full_history)[source]¶
:full-history:keeps the releases the envelope leaves out.- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_full_history_marker(split_floor_repo, tmp_path)[source]¶
The
full-historymarker flag keeps the releases the envelope drops.- Return type:
- tests.sphinx.test_sphinx_matrix.test_matrix_python_directive_renders_table(sphinx_app_myst, synthetic_repo)[source]¶
{matrix} pythonrenders the generated table as a real<table>.- Return type:
- tests.sphinx.test_sphinx_matrix.test_matrix_python_directive_respects_floors(sphinx_app_myst, synthetic_repo)[source]¶
The hyphenated directive options map to the floor parameters.
- tests.sphinx.test_sphinx_matrix.test_matrix_python_directive_order_options(sphinx_app_myst, synthetic_repo)[source]¶
The
:column-order:/:row-order:options flip both axes.
- tests.sphinx.test_sphinx_matrix.test_matrix_python_directive_no_tags_renders_nothing(sphinx_app_myst, tmp_path)[source]¶
A repository with no release tags yields no table (a build warning).
- tests.sphinx.test_sphinx_matrix.test_matrix_python_directive_renders_embedded_table(sphinx_app_myst)[source]¶
An embedded table renders as a real
<table>without any git access.This is the self-updating steady state: the offline updater keeps the table in the source, and the build renders that copy verbatim.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_populates_empty_block(synthetic_repo, tmp_path)[source]¶
The updater fills an empty block, keeping options and surrounding text.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_idempotent(synthetic_repo, tmp_path)[source]¶
A second run over freshly written blocks reports no change.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_check_mode(synthetic_repo, tmp_path)[source]¶
check=Trueflags a stale block without writing to disk.- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_leaves_bad_path_untouched(tmp_path)[source]¶
A block whose git generation fails is left byte-for-byte unchanged.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_keeps_other_line_separators(tmp_path)[source]¶
Prose holding a line separator other than a newline is copied verbatim.
A Unicode line separator splits a line for
str.splitlines, not for a Markdown reader: a refresh writing it back as a newline would rewrite the page, and report it stale on every check.- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_leaves_an_unreadable_pypi_untouched(synthetic_dep_repo, tmp_path, unreadable_pypi)[source]¶
An unreachable PyPI is a generation failure, not a stale block.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_skips_examples_nested_in_code_block(synthetic_repo, tmp_path)[source]¶
Matrix examples shown inside a longer code fence are never refreshed.
Both forms are documented illustrations here, not live blocks, even though their generation would succeed: the fence-aware walk copies them verbatim.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_refresh_directives_cli(synthetic_repo, tmp_path)[source]¶
click-extra refresh-directivesrefreshes in place; –check gates CI.- Return type:
- tests.sphinx.test_sphinx_matrix.test_refresh_directives_cli_without_sphinx(tmp_path, monkeypatch)[source]¶
The command fails gracefully (not a traceback) when sphinx is absent.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_to_specifier_set(spec, member, nonmember)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_to_specifier_set_unparsable(spec)[source]¶
An unparsable specifier yields
None, which renders as an all-❌row rather than raising out of the Sphinx build.- Return type:
- tests.sphinx.test_sphinx_matrix.test_to_specifier_set_empty_matches_everything()[source]¶
An empty specifier is the universal set, not
None.Unreachable through the matrix itself, since a tag with no declared requirement is skipped before this point.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_spec_identity(spec, other, expected)[source]¶
Two specifiers share an identity when they accept the same versions.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_extract_requirement(declaration, expected)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_extract_requirement_canonicalizes_name()[source]¶
PEP 503 name normalization decides the match, so a dependency spelled with any separator is found under any other spelling.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_extract_requirement_from_setup_py()[source]¶
A
setup.pyrelease has no tables to read, so its string literals are harvested and filtered by the same PEP 508 parse.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_cell(spec, version, released, expected)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_cell_caps_later_majors(version, released, expected)[source]¶
A superseded range never attests a major newer than its cap.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_newest_major()[source]¶
The newest major out by a day, and none without a dated release.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_columns(rows, shown, expected)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_envelope(rows, full_history, expected)[source]¶
Rows come oldest first, and columns run from the oldest version.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_column_candidates(specs, releases, locked, expected)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_latest_locked_version(tmp_path, dep_name, expected)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_latest_locked_version_without_lockfile(tmp_path)[source]¶
A project with no
uv.locklocks nothing, rather than failing.- Return type:
- tests.sphinx.test_sphinx_matrix.stub_releases(monkeypatch, *versions, dates=None)[source]¶
Make PyPI list
versionsas the stable releases of every dependency.A release is undated unless
datesgives its ISO publication date, so a stub without dates never produces an undeclared cell.- Return type:
- tests.sphinx.test_sphinx_matrix.synthetic_dep_repo(tmp_path)[source]¶
A git repo whose
widgetdependency floor evolves across two tags, exercising both minor-grouped and patch-split column derivation.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_groups(synthetic_dep_repo)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_group_keeps_its_released_fields()[source]¶
The four fields of
10.2.0keep their positions, and build a group alone.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_columns_and_cells(synthetic_dep_repo, monkeypatch)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.exotic_spec_repo(tmp_path)[source]¶
A repo whose
widgetrequirement takes a different exotic shape at every tag, so one render exercises the whole specifier vocabulary.The caret tag also migrates the declaration from Poetry to PEP 621 and back, the way a real project’s history crosses packaging backends.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_exotic_specs(exotic_spec_repo, monkeypatch)[source]¶
Each specifier shape resolves to the right
✅/❌vector.The exclusion hole of
>=4.0,!=4.1.*isolates 4.1.0, and the 2.1.0 release no range accepts keeps its column between two that some do. The full history keeps the ranges the support envelope would leave out.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_merges_equivalent_specs(tmp_path)[source]¶
Consecutive tags differing only in spelling form a single range.
Poetry’s
^2.0and PEP 621’s>=2.0,<3.0.0describe the same set, so they group into one range instead of two identical rows. This is what a packaging-backend migration looks like in the history.- Return type:
- tests.sphinx.test_sphinx_matrix.narrowing_floor_repo(tmp_path)[source]¶
A repo whose
widgetfloor narrows across three tags, locked at 4.0.0.The caret range accepts 3.1 and the compatible-release range does not.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_merge_keeps_distinct_specs(tmp_path, monkeypatch, show_spec, expected)[source]¶
Ranges whose cells coincide merge, unless their specs differ.
Both ranges accept every release so far, and differ only above the newest one. A merged row shows the Spec cell of its oldest range, so merging them would claim
<4for releases that declared<5.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_bins_split_ranges(narrowing_floor_repo, monkeypatch)[source]¶
The releases between two floors tell the ranges apart on their cells.
- Return type:
- tests.sphinx.test_sphinx_matrix.pinned_widget_repo(tmp_path, name, spec)[source]¶
A one-tag repo pinning
widgettospec, locked at 2.4.0.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_pinned_spec(tmp_path, monkeypatch, spec, columns, cells)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_lone_ceiling(tmp_path)[source]¶
A lone ceiling anchors no column of its own.
Unlike a pin, it has no lower bound to place, so the only column left is the locked version, which the ceiling genuinely forbids. The all-❌ row is the honest rendering here, not a missing column.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_suffixed_poetry_floor(tmp_path, monkeypatch)[source]¶
A Poetry caret on a post-release translates like any other caret.
Its floor keeps the suffix, so the release it follows falls out of range, and its ceiling ignores it, so the later 2.x release stays in.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_shows_a_release_ahead_of_the_lock(tmp_path, monkeypatch)[source]¶
A release newer than the locked one gets a column of its own.
The table shows it before the lockfile adopts it, here as a major no range accepts yet. The locked version counts even when PyPI does not list it.
- Return type:
- tests.sphinx.test_sphinx_matrix.WIDGET_DATES = {'1.0.0': '2023-12-01', '2.0.0': '2024-05-01', '2.1.0': '2024-06-10', '3.0.0': '2025-01-01'}¶
Publication dates of the
widgetreleases the dated repository sees.
- tests.sphinx.test_sphinx_matrix.dated_dep_repo(tmp_path)[source]¶
A repo raising its
widgetfloor at each of three dated tags.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_undeclared_after_superseded(dated_dep_repo, monkeypatch)[source]¶
A release out after a range was superseded reads
–for that range, though its specifier accepts it. So does a release of a major out after the last release of the range:1.0.0never metwidget2.x, and2.0.0never metwidget3.0.0.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_unmet_major_after_last_release(tmp_path, monkeypatch)[source]¶
A major out after the last release of a superseded range reads
–.widget1.5.0 and 2.0.0 both come out after1.1.0, the last release of the1.xrange, and before2.0.0supersedes it. Its open specifier accepts both, and the range met the 1.x major, so 1.5.0 reads✅. No release of the range ever met 2.0.0.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_envelope(dated_dep_repo, monkeypatch)[source]¶
The envelope stops at the oldest range supporting the floor or later.
A range supports a dated release it accepts only when the release came out while the range was current, from a major out by its last release. Neither older range ever met
widget3.0.0, the floor of the newest range, so both go, and the columns only they accepted too.- Return type:
- tests.sphinx.test_sphinx_matrix.ENVELOPE_WIDGET_DATES = {'1.0.0': '2021-12-01', '2.0.0': '2023-05-01', '3.0.0': '2024-12-01'}¶
Publication dates of the
widgetreleases the envelope repository sees.
- tests.sphinx.test_sphinx_matrix.envelope_repo(tmp_path)[source]¶
A repo declaring its Python support and a
widgetfloor at each tag.The Python envelope leaves out
1.0.0, which supports no Python from 3.11 on. Thewidgetone keeps every release.- Return type:
- tests.sphinx.test_sphinx_matrix.test_envelope_list_across_axes(envelope_repo, monkeypatch)[source]¶
The release bound is the strictest one, and each version bound is read again over the releases left in scope.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_envelope_list_without_cut(synthetic_dep_repo)[source]¶
With no envelope leaving out a release, the list has no release bound. An axis the history never declares is skipped, and a version of unknown date gets no date.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_envelope_region(envelope_repo, tmp_path, monkeypatch)[source]¶
The refresh fills an envelope region between its markers, and settles.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_leaves_an_envelope_region_untouched(envelope_repo, tmp_path, unreadable_pypi, args)[source]¶
An unreadable PyPI, or a region naming no axis, rewrites nothing.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_groups_respelled_spec_continues_range(tmp_path, monkeypatch)[source]¶
A re-spelled specifier continues its range.
widget1.5.0 came out after1.1.0re-spelled the specifier, while that range was still current, so it reads✅for the whole range. Split at the re-spelling,1.0.0would look superseded before 1.5.0 came out. The whole history keeps the range in the table, though it never met the 2.x major that the newest range floors.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_headers_read_in_column_order(synthetic_dep_repo, monkeypatch, column_order, expected)[source]¶
A header reads from the bound its neighbors continue: the newest one while the columns run newest first, the oldest one otherwise.
- Return type:
- tests.sphinx.test_sphinx_matrix.pypi(httpserver, monkeypatch)[source]¶
Serve PyPI’s JSON API from the local test server.
- tests.sphinx.test_sphinx_matrix.test_pypi_releases(pypi)[source]¶
The lookup asks for the normalized name and sorts the releases.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_pypi_releases_dates(pypi)[source]¶
A release is dated by the first upload among its files not yanked.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_pypi_releases_discards(pypi, tag, files)[source]¶
Pre-releases, yanked or empty releases and invalid versions are dropped.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_pypi_releases_unreadable(pypi, body, status)[source]¶
An error or a malformed answer costs the columns, not the table.
A caller that cannot use the fallback columns hears about the failure.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_to_specifier_set_poetry_conformance(spec, bounds)[source]¶
Every Poetry range translates to the interval Poetry documents.
The
0.xcaret is the one that matters in practice: Poetry caps it at the next minor, since a0.release is allowed to break on every minor.- Return type:
- tests.sphinx.test_sphinx_matrix.test_to_specifier_set_poetry_bare_wildcard()[source]¶
Poetry’s bare
*allows any version, so it has no bounds to check.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_show_date(synthetic_dep_repo, show_date)[source]¶
show_datedates the rows without changing how they merge.- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_column_order(synthetic_dep_repo, column_order)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_dependency_matrix_table_row_order(synthetic_dep_repo, row_order)[source]¶
- Return type:
- tests.sphinx.test_sphinx_matrix.test_matrix_dependency_directive_renders(sphinx_app_myst, synthetic_dep_repo)[source]¶
{matrix} <dep>renders the dependency matrix as a real<table>.
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_marker_form(synthetic_repo, tmp_path)[source]¶
The
<!-- matrix AXIS opts -->comment form refreshes to a raw table.- Return type:
- tests.sphinx.test_sphinx_matrix.test_walk_tags_dates_an_annotated_tag(tmp_path)[source]¶
A tag’s date is its commit’s author date, through an annotated tag too.
The tag object of an annotated tag carries a tagger date of its own, which is not the one the row shows.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_reads_git_twice_per_refresh(synthetic_repo, tmp_path, monkeypatch)[source]¶
One refresh lists the tags and reads their files once, whatever the blocks.
Two pages carrying three blocks, with floors of their own, share the same history: the tag listing is one
git for-each-refand every tag’s files onegit cat-file --batch.- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_marker_order_options(synthetic_repo, tmp_path)[source]¶
column-order/row-ordermarker options flip the refreshed table.- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_marker_show_date(synthetic_repo, tmp_path, flag)[source]¶
The
show-datemarker flag dates the refreshed rows.- Return type:
- tests.sphinx.test_sphinx_matrix.test_matrix_directive_show_date_option(sphinx_app_myst, synthetic_repo)[source]¶
The
:show-date:directive option dates the rendered rows.- Return type:
- tests.sphinx.test_sphinx_matrix.test_marker_form_renders_natively_in_sphinx(sphinx_app_myst)[source]¶
A marker region’s raw table renders as a real
<table>with no directive involved (so it renders on GitHub the same way).- Return type:
- tests.sphinx.test_sphinx_matrix.test_resolve_root_relative_base_dir(synthetic_repo, monkeypatch)[source]¶
A relative
base_dirstill resolves to the real repo folder, so the default package label is never the emptyPath(".").name.- Return type:
- tests.sphinx.test_sphinx_matrix.test_render_block_default_package_label(tmp_path, pyproject, options, expected)[source]¶
Without a
packageoption, the label is the name the project declares in itspyproject.toml. The folder name is the fallback.- Return type:
- tests.sphinx.test_sphinx_matrix.test_update_matrix_blocks_label_ignores_checkout_name(tmp_path)[source]¶
A copy of a project under another folder name agrees with the table refreshed in the first checkout, so its check reports nothing stale.
- Return type:
- tests.sphinx.test_sphinx_matrix.test_render_block_raises_without_git(tmp_path, monkeypatch)[source]¶
With git absent from PATH, generation raises an error the callers catch.
- Return type: