tests.test_screenshots module¶
Tests for click_extra.capture and the captures committed under docs/.
A screenshot is CLI output that stopped re-running, so it rots the moment the
command it pictures changes. A rendered capture is machine-readable, which is
what makes both halves of this module possible: every run of same-styled
characters is one <text> element carrying its column as an x offset and its
width as a textLength, so the terminal text can be rebuilt from the glyph
coordinates and compared to what a CLI prints today.
That comparison needs neither a network round-trip nor a capture tool, which
keeps this an ordinary unit test. When the drift check fails, re-run the command
documented alongside the image in docs/screenshots.md.
- tests.test_screenshots.ASSETS = PosixPath('/home/runner/work/click-extra/click-extra/docs/assets')¶
Directory the committed captures live in.
- tests.test_screenshots.COMMITTED_PROMPT = '$ '¶
Prompt sigil every committed capture was shot under.
PROMPTis the running platform’s, and Windows draws>there, so a reshoot has to be normalized back to this one before the two are compared. What the check is about is the command’s output, not which shell drew the line above it.
- class tests.test_screenshots.Capture(filename, args, columns=80, head=None, background=TerminalBackground.DARK)[source]¶
Bases:
NamedTupleA terminal capture committed under
docs/assetsand embedded in the docs.Carries what it takes to reshoot it, which is what makes the drift check below able to state the command each image is supposed to picture.
Create new instance of Capture(filename, args, columns, head, background)
- columns: int¶
Terminal width it was shot at.
A CLI wraps its output to the ambient terminal size, so a check running under a different width would compare a differently wrapped screen and fail on the wrapping alone.
- background: TerminalBackground¶
Chrome it was drawn on, which is also the terminal it was told it ran in.
- property prompt: str¶
The
COMMITTED_PROMPTline the capture draws above its output.
- property command: tuple[str, ...]¶
The command line reproducing this capture through this interpreter.
docs/screenshots.mddocuments the same commands reached throughuv run, which is what a human types from a checkout. Going straight atsys.executablekeeps the check independent of uv, and of whether the environment happens to be synced.
- tests.test_screenshots.COMMITTED_CAPTURES = (('auto-theme-dark-screen.svg', ('--theme', 'auto', 'themes', '--help'), 80, None, TerminalBackground.DARK), ('auto-theme-light-screen.svg', ('--theme', 'auto', 'themes', '--help'), 80, None, TerminalBackground.LIGHT), ('color-gradient-screen.svg', ('gradient',), 80, None, TerminalBackground.DARK), ('text-styles-screen.svg', ('styles',), 160, 14, TerminalBackground.DARK), ('theme-gallery-screen.svg', ('themes',), 80, 34, TerminalBackground.DARK))¶
Every capture shot by the
screenshotcommand, in file-name order.The
hello-click*pair opening the readme is not here: those are written by the tutorial’s ownclick:runblocks at documentation-build time, and guarded bytests/test_sphinx_crossrefs.pyinstead.
- tests.test_screenshots.SAMPLE_CAPTURE = '\x1b[1mFruit\x1b[0m Colour\nbanana yellow\nkiwi green\n\n2 fruits\n'¶
A small styled capture, with padded columns and a blank line to preserve.
The second column is deliberately left unstyled: sharing a style with the padding that precedes it is what folds the two into a single run, which is the case that would otherwise place a column by the width of the spaces before it. Style the column and the padding becomes a run of its own.
- tests.test_screenshots.svg_to_lines(svg)[source]¶
Rebuild the captured terminal lines from a rendered capture.
Groups the
<text>runs into lines by their sharedybaseline, then lays each one back on its column: the capture is monospaced, so dividing a run’sxoffset byCELL_WIDTHgives the character column it starts at. Runs are placed by their coordinates, not by their order in the source, which an animation sharing pieces between frames does not keep.
- tests.test_screenshots.KEYFRAMES_RE = re.compile('@keyframes (?P<name>[\\w-]+) \\{ (?P<steps>.*?) \\}\\n')¶
One keyframe rule of an animated capture’s stylesheet.
- tests.test_screenshots.VISIBILITY_STEP_RE = re.compile('(?P<at>[\\d.]+)% \\{ visibility: (?P<state>\\w+);')¶
One step of a frame’s or a shared group’s keyframes.
- tests.test_screenshots.played_frames(svg, unique_id)[source]¶
Each frame of an animated capture, as the still a viewer sees during it.
Plays the stylesheet the way a browser does: in the middle of each frame’s slice of the cycle, every group whose keyframes show it stays and loses its hiding attributes, and every other group is removed. What is left is the picture a reader sees at that moment.
- tests.test_screenshots.poster_frame(svg)[source]¶
The still a viewer reading no stylesheet shows of an animated capture.
Every group an attribute hides is removed, which is all such a viewer honors.
- Return type:
- tests.test_screenshots.svg_window(svg)[source]¶
The width and height of the terminal window drawn in a capture.
- tests.test_screenshots.html_to_text(markup)[source]¶
Strip a capture’s markup back off, leaving the terminal text.
- Return type:
- tests.test_screenshots.test_trim_lines(head, tail, expected)[source]¶
headandtailkeep their ends and account for what they dropped.
- tests.test_screenshots.test_trim_lines_rules_the_default_marker_across_the_picture()[source]¶
The default marker is a rule, spanning the width the picture is laid out at: the widest kept line when the width is left to the command.
- tests.test_screenshots.test_trim_lines_caps_the_rule_at_the_terminal_width()[source]¶
A kept line wider than the capture draws a rule as wide as the capture.
The rule is measured on the kept lines, so a 150-cell log line among them asked for a 150-cell rule in an 80-column image. The renderer folds any line reaching past the width, so that rule came back as a row of dots plus its tail alone on a second row, started outside the text column.
- tests.test_screenshots.test_rule_marker_tracks_the_drawn_width(columns, width_floor, expected)[source]¶
The
autorule spans the text column the picture is drawn at.
- tests.test_screenshots.test_resolve_wrap_marker(wrap_marker, expected)[source]¶
Only
autois replaced: any other marker, empty included, is taken as is.
- tests.test_screenshots.test_trim_lines_leaves_room_for_the_wrap_marker()[source]¶
A rule capped to the width gives up the cell a wrap marker takes.
Capped to
columnsalone, the rule filled the row the marker shortens, so it folded on its last dot and closed its row on the marker, reading as a rule that continues below.
- tests.test_screenshots.test_capture_leaves_room_for_line_numbers_on_the_rule(prompt, head, tail)[source]¶
A numbered capture rules its cut inside the text column the gutter leaves.
The gutter takes cells in front of every row, the rule’s included, so a rule as wide as
columnswould fold on its last dots and put them alone on a row of their own.
- tests.test_screenshots.test_render_draws_the_wrap_marker_at_each_fold()[source]¶
An SVG capture closes each folded row on the marker, and only those rows.
- tests.test_screenshots.test_trim_lines_closes_a_style_the_cut_left_open(truncation)[source]¶
A cut between a style’s opening and its reset does not style the marker.
A heading printed as
style("\n● Step")opens its style on the line above the text and resets it on the text’s own line. Cut between the two, the open underline ran into the marker, and into the linestailkept after it.
- tests.test_screenshots.test_trim_lines_adds_no_reset_after_a_closed_style()[source]¶
A head that closes every style it opens gets its marker untouched.
- tests.test_screenshots.test_trim_lines_keeps_a_marker_too_wide_for_its_rule_bare()[source]¶
A capture narrower than the frame gets the label alone, not a broken rule.
- tests.test_screenshots.test_trim_lines_leaves_an_explicit_marker_alone()[source]¶
Naming a marker takes it verbatim: only
autoasks for a rule.
- tests.test_screenshots.test_tile_runs_never_opens_a_piece_on_padding()[source]¶
A tiled column cut at a blank carries it into the piece before it.
A piece is placed by its first glyph, so one opening on a blank draws every tile behind it a cell late. The cut is made on character count, which lands on a blank whenever a label sits inside a rule.
- tests.test_screenshots.test_tile_runs_keeps_every_piece_on_its_own_column()[source]¶
Cutting a tiled column apart never moves a glyph off its cell.
The cut counts characters and the offset counts cells, which part ways on a wide character.
- tests.test_screenshots.test_tile_runs_cuts_every_tile_it_was_released_with(tile)[source]¶
tile_runscuts Block Elements as well as Box Drawing, as10.1.1did.A capture draws both as shapes, which leaves the deprecated helper no caller in the renderer: its answer stays the released one until it goes. The cut is spelled out, so
TILE_RUNkeeping its released 8 cells is checked too.
- tests.test_screenshots.test_tile_helpers_warn_until_their_removal(name, private)[source]¶
The tile helpers a capture no longer uses still resolve, with a warning.
- tests.test_screenshots.test_svg_module_serves_no_other_missing_name()[source]¶
A name the module never had stays missing, and sets off no warning.
- tests.test_screenshots.named_eighths(char)[source]¶
The eighths of its cell a Block Elements character fills, read off its name.
A Unicode name states the shape outright, like
LOWER THREE EIGHTHS BLOCKorQUADRANT UPPER LEFT AND LOWER RIGHT, which makes it a second source to holdBLOCK_ELEMENTSagainst.
- tests.test_screenshots.test_block_elements_cover_their_whole_unicode_block()[source]¶
Every Block Elements character has a shape, and is one cell wide.
- tests.test_screenshots.test_block_element_fills_what_its_name_states(char)[source]¶
Each Block Elements character fills the part of its cell its name states.
- tests.test_screenshots.test_shape_runs_cut_shapes_from_the_text_between(text, column, expected)[source]¶
Shapes are cut out on their own columns, and nothing else.
Box Drawing, Block Elements and Braille patterns are drawn as shapes. One following a zero width joiner belongs to the cluster before it, and stays in its text.
- tests.test_screenshots.test_shape_runs_place_each_piece_where_cell_width_counts_it(text)[source]¶
Each piece starts on the column
cell_widthcounts up to it.cell_widthcounts the character after a zero width joiner in the cluster before it. A shape cut out of that cluster would push the text after it a cell past its column, onto the run the grid places next.
- tests.test_screenshots.test_braille_dots_match_their_unicode_names(code)[source]¶
Each Braille pattern raises the dots its Unicode name lists.
- tests.test_screenshots.test_braille_dots_keep_one_pitch_across_cells()[source]¶
Two stacked rows of full Braille cells plot one even grid of dots.
The dot positions are rounded to a tenth of a pixel, the precision every coordinate of a capture is written at.
- tests.test_screenshots.named_arms(char)[source]¶
The arms of a Box Drawing line, read off its Unicode name.
A name states one weight for all its arms, as in
LIGHT DOWN AND RIGHT, or one per group of arms, as inDOWN LIGHT AND RIGHT HEAVY.
- tests.test_screenshots.test_box_drawing_covers_its_whole_unicode_block()[source]¶
Every Box Drawing character is a line, a dash or a curve, one cell wide.
- tests.test_screenshots.test_box_arms_match_their_unicode_names(char)[source]¶
Each Box Drawing line has the arms and weights its Unicode name lists.
- tests.test_screenshots.test_box_dashes_match_their_unicode_names(char)[source]¶
Each dashed line runs the way, weighs and counts what its name says.
- tests.test_screenshots.test_box_strokes_join_as_menlo_draws_them(char, expected)[source]¶
A line’s strokes meet where Menlo
22.0d2e1joins them.
- tests.test_screenshots.test_double_cross_leaves_its_gaps_open()[source]¶
No stroke of
╬crosses into the gaps between its double lines.
- tests.test_screenshots.test_box_rule_is_one_shape_and_its_lines_meet_across_rows()[source]¶
A rule merges across its cells, and a vertical line runs on into the next row.
- tests.test_screenshots.test_blank_braille_draws_nothing_and_keeps_its_text()[source]¶
The blank pattern raises no dot, and still reads back as itself.
- tests.test_screenshots.test_stacked_blocks_leave_no_gap()[source]¶
Two rows of full blocks paint one unbroken column, whatever the font.
A font draws
█shorter than a capture’s row, so the same picture set as glyphs leaves a band of background between the two rows.
- tests.test_screenshots.test_half_block_splits_its_cell_in_the_middle()[source]¶
▀inks the top half of its cell and leaves the bottom to the background.
- tests.test_screenshots.test_block_run_is_one_shape()[source]¶
A bar of
█is one rectangle, not one per cell.
- tests.test_screenshots.test_shade_mixes_its_ink_with_the_paper()[source]¶
▒is half ink, mixed into the color behind it.
- tests.test_screenshots.test_shapes_stay_in_the_text()[source]¶
A run drawn as shapes keeps its characters, as text that paints nothing.
- tests.test_screenshots.test_no_committed_capture_draws_shapes_as_glyphs()[source]¶
No committed capture draws Box Drawing, Block Elements or Braille as glyphs.
A capture written before the renderer did still shows a seam at the joins of its box drawing, a band between its stacked rows of block art, or Braille wider than its column. Rewrite it the way its page documents: a recording, by deleting it and building again.
- tests.test_screenshots.test_style_rules_writes_one_declaration_per_property(sgr, expected)[source]¶
Every decoration reaches the CSS, and the three share one declaration.
CSS keeps the last of a repeated property, so a run written as two
text-decorationdeclarations loses all but one of them.overlinehad no branch at all, which left the column ofclick-extra stylesnaming it identical to the plain one in every viewer.
- tests.test_screenshots.test_render_folds_an_unusable_unique_id()[source]¶
A file name that is not a CSS identifier cannot leak into a class name.
- tests.test_screenshots.test_render_places_every_run_on_its_own_column()[source]¶
Rebuilding the terminal text from a capture gives the text back.
Each run is placed by its
xoffset alone, so laying the runs back on the columns that offset names has to reproduce what the terminal printed.
- tests.test_screenshots.test_no_run_starts_on_padding()[source]¶
No visible run in a capture is positioned by the spaces preceding it.
The invariant the column arithmetic exists for: a renderer that ignores
textLengthor cannot resolve the font still lands every run where it belongs. Checked against every committed capture as well as a fresh render, so a regression cannot hide in the assets or in the renderer alone.
- tests.test_screenshots.test_capture_clip_holds_every_descender()[source]¶
The terminal’s clip is never shorter than the text it contains.
A clip cropped to the text block’s height minus a pixel cuts the descenders off the last line, turning an underscore into a blank. Checked against every committed capture, which is where such a crop would go unnoticed.
- tests.test_screenshots.test_no_capture_references_a_missing_clip()[source]¶
Every
clip-patha capture uses resolves to aclipPathit defines.A dangling reference is rendered inconsistently: a browser drops the clip, a strict SVG 1.1 renderer drops the whole element with it.
- tests.test_screenshots.ANIMATION_PRESETS = ('aesthetic', 'arc', 'arrow', 'arrow2', 'arrow3', 'balloon', 'balloon2', 'beta-wave', 'binary', 'blue-pulse', 'bounce', 'bouncing-ball', 'bouncing-bar', 'box-bounce', 'box-bounce2', 'christmas', 'circle', 'circle-halves', 'circle-quarters', 'clock', 'dots', 'dots-8bit', 'dots-circle', 'dots10', 'dots11', 'dots12', 'dots13', 'dots14', 'dots2', 'dots3', 'dots4', 'dots5', 'dots6', 'dots7', 'dots8', 'dots9', 'dqpb', 'dwarf-fortress', 'earth', 'finger-dance', 'fish', 'fist-bump', 'flip', 'grenade', 'grow-horizontal', 'grow-vertical', 'hamburger', 'hearts', 'layer', 'line', 'line2', 'material', 'mindblown', 'monkey', 'moon', 'noise', 'orange-blue-pulse', 'orange-pulse', 'pipe', 'point', 'pong', 'rolling-line', 'runner', 'sand', 'shark', 'simple-dots', 'simple-dots-scrolling', 'smiley', 'soccer-header', 'speaker', 'square-corners', 'squish', 'star', 'star2', 'toggle', 'toggle10', 'toggle11', 'toggle12', 'toggle13', 'toggle2', 'toggle3', 'toggle4', 'toggle5', 'toggle6', 'toggle7', 'toggle8', 'toggle9', 'triangle', 'weather')¶
Every bundled spinner: the population an animated capture is checked over.
- tests.test_screenshots.animated_capture(name)[source]¶
Draw one bundled spinner as an animated capture.
- Return type:
- tests.test_screenshots.stylesheet_of(svg)[source]¶
The
<style>block of a rendered capture.- Return type:
- tests.test_screenshots.claimed_names(svg)[source]¶
Every name a capture’s stylesheet claims in the scope of a whole page.
Class selectors and keyframe names both: inlined into one HTML document, the stylesheets of two captures are global and share that scope.
- tests.test_screenshots.test_animated_capture_defines_every_class_it_uses(name)[source]¶
No frame names a class its capture’s stylesheet leaves undefined.
An undefined class does not blank its frame: the text falls back to the presentation attributes and draws in a default face in the window’s own ink. The animation then appears to reset its styling once a cycle, only the frames carrying a rule looking right.
- tests.test_screenshots.test_animated_capture_draws_its_chrome_once(name)[source]¶
The window, its caption and its clip path are drawn once, not per frame.
- tests.test_screenshots.test_animation_windows_tile_the_cycle(name)[source]¶
Each frame’s window abuts the next, covering the cycle exactly once.
A gap leaves the picture blank for part of every turn; an overlap draws two frames on top of each other.
- tests.test_screenshots.test_animated_capture_draws_a_row_that_never_moves_once()[source]¶
A row identical in every frame is drawn outside them, not once per frame.
On a recording where one line moves under a screen of lines that do not, this is the difference between one copy of that screen and one per frame.
- tests.test_screenshots.test_animated_capture_keeps_a_row_that_moves_in_every_frame()[source]¶
Nothing is shared when every row differs, which is the spinner’s case.
- tests.test_screenshots.TRAIL_FRAMES = ['⠋ picking', 'picked basket 0\n⠙ picking', 'picked basket 0\npicked basket 1\n⠹ picking', 'picked basket 0\npicked basket 1\npicked basket 2\n⠸ picking', 'picked basket 0\npicked basket 1\npicked basket 2\npicked basket 3\n⠼ picking', 'picked basket 0\npicked basket 1\npicked basket 2\npicked basket 3\npicked basket 4\n⠴ picking']¶
A trail filling up under a spinner: pieces each frame keeps, adds and moves.
- tests.test_screenshots.test_animated_capture_shows_each_frame_what_it_drew(frames, blank)[source]¶
At any moment, an animation shows exactly the frame that is due.
Pieces several frames draw are drawn once and timed over all of them, so no frame’s picture exists as such in the source: this plays the stylesheet and compares each moment with the still of the same frame.
- tests.test_screenshots.test_animated_capture_paints_every_background_before_any_glyph()[source]¶
A background one frame paints never covers a glyph the frames share.
The text stays put while the paint behind it changes, so the glyphs are drawn once for every frame and each background once per frame. Drawn in the order the groups come in, a frame’s background would land on top.
A piece several frames draw is drawn once, in a group timed over them.
A line arriving midway through a recording stays until its end: one copy shown from its first frame on, rather than one copy per frame.
- tests.test_screenshots.test_animated_capture_copies_a_piece_too_small_to_time()[source]¶
A piece costing less than a timing rule is copied into its frames instead.
Each glyph of a spinner looping twice shows in two frames far apart. Timing it as a group of its own would take more than drawing it twice.
- tests.test_screenshots.BAND_GROUP_RE = re.compile('<g clip-path="url\\(#[\\w-]+-window\\)">(.*?)</g>')¶
The group holding every band, clipped to the window rather than to the text.
- tests.test_screenshots.bands_of(svg)[source]¶
The paint and baseline of each band an emphasized capture draws.
- tests.test_screenshots.test_emphasized_lines_are_banded_where_they_sit()[source]¶
A band lands on the row it names, counted from one, and spans the window.
Edge to edge rather than stopping where the padding does: the row is what is emphasized, not the column of text sitting in it.
- tests.test_screenshots.test_emphasis_is_mixed_from_the_chrome_it_is_drawn_on()[source]¶
One ratio answers for both chromes: lighter on dark, darker on light.
- tests.test_screenshots.test_emphasis_rejects_a_line_the_capture_does_not_have()[source]¶
Naming a line past the end is an authoring error, not a silent no-op.
- tests.test_screenshots.test_screenshot_reports_a_line_the_capture_does_not_have(invoke, tmp_path)[source]¶
The command reports the authoring error as one, not as a traceback.
The height of a capture is only known once its command has run, so the renderer is the one to refuse a band past its end, and the command turns that refusal into its own error message.
- tests.test_screenshots.FRAME_BAND_RE = re.compile('<g class="([\\w-]+)-f(\\d+)"[^>]*clip-path="url\\(#[\\w-]+-window\\)">(.*?)</g>')¶
A band group riding one frame of an animation.
- tests.test_screenshots.test_emphasis_arrives_with_the_row_it_marks()[source]¶
A band shows in the frame that first draws its row, and not before.
Waiting in empty space for the animation to reach it reads as a stray rectangle. Arriving with the row is also the moment a gutter would first number that row, so the two land together.
- tests.test_screenshots.test_emphasis_leaves_a_closing_blank_alone()[source]¶
The empty beat closing a cycle draws no band, having drawn no row.
Two animated captures inlined in one page keep their own timing.
Both stylesheets are global there. A selector they share hands the shorter animation the longer one’s clock, and the frames it does not have go blank for that part of every cycle.
- tests.test_screenshots.test_frame_animation_css_only_ever_animates()[source]¶
Every rule the timing emits sits behind the reduced-motion guard.
Nothing here hides a frame: that is the frames’ own
visibilityattribute, which is what a renderer reading no stylesheet still honors. A reader asking their system for less motion therefore lands on the same still as one whose viewer speaks no CSS animation at all.
- tests.test_screenshots.test_animated_capture_hides_its_frames_outside_the_stylesheet(name)[source]¶
Every frame but the poster is hidden by an attribute, not by a rule.
A renderer free to ignore
<style>would otherwise draw all of them at once, stacked on top of each other. The poster is the last frame, which on an animation that accumulates is the one that says the most.
- tests.test_screenshots.test_animated_capture_renders_the_same_bytes_twice(name)[source]¶
An unchanged animation rewrites byte-identical bytes.
What lets a committed asset be regenerated on every build without dirtying the working tree.
- tests.test_screenshots.test_cursor_cell_reads_the_screen_it_is_given(picture, expected)[source]¶
A frame’s text already says where the terminal left its cursor.
- tests.test_screenshots.test_cursor_cell_matches_the_screen_that_wrote_it()[source]¶
The derived column is the one the screen itself counted, not an estimate.
Locks the claim
cursor_cell()rests on: a recorded frame carries its cursor position implicitly, so nothing has to travel beside the text to say where the cursor was.
- tests.test_screenshots.cursor_rect(svg)[source]¶
The cursor a capture drew, as its x, y, width and height.
Found by its
crispEdgesrendering, which the text of these tests carries on nothing else: they draw unstyled words, so no run brings a background rectangle of its own. The count is asserted rather than assumed, so a test picture that grows a styled run fails here instead of measuring the wrong rectangle.
- tests.test_screenshots.test_a_capture_draws_no_cursor_unless_asked()[source]¶
The default is no cursor, which is what every committed asset shows.
- tests.test_screenshots.test_cursor_is_drawn_in_the_shape_it_names(shape, width, height)[source]¶
Each shape covers the part of its cell that shape is.
- tests.test_screenshots.test_a_shapeless_cursor_takes_the_terminal_its_preset_names(name)[source]¶
--preset windowsdraws Windows Terminal’s bar without stating it.
- tests.test_screenshots.test_a_cursor_under_the_output_grows_the_window_by_that_line()[source]¶
Output closing on a newline leaves the cursor on the row underneath.
- tests.test_screenshots.test_a_cursor_does_not_move_what_emphasize_may_mark()[source]¶
A band picks out a line of output, and a cursor draws no line.
- tests.test_screenshots.test_an_animated_cursor_blinks_on_one_clock()[source]¶
One rule and one keyframe set, however many frames carry a cursor.
A terminal has one cursor. Namespacing the blink per frame would instead let each copy light on its own beat, which reads as several cursors.
- tests.test_screenshots.test_the_blank_closing_a_cycle_shows_no_cursor()[source]¶
An empty terminal has nothing to put a cursor on.
- tests.test_screenshots.test_a_steady_cursor_names_no_class()[source]¶
A class the stylesheet never defines is what breaks a renderer.
- tests.test_screenshots.test_a_blinking_cursor_sits_behind_the_reduced_motion_guard()[source]¶
Blinking is motion, and a reader may have asked for less of it.
- tests.test_screenshots.test_a_blink_never_touches_visibility()[source]¶
Opacity multiplies into a hidden frame’s group; visibility would override it.
A frame is hidden by
visibilityandopacitytogether, andvisibilityis inherited: a cursor restoring it would show through every frame at once, which is the whole reason the blink dims opacity alone.
- tests.test_screenshots.test_blink_css_rejects_a_blink_going_nowhere()[source]¶
A cursor blinking in no time is a cursor that never lights.
- tests.test_screenshots.test_a_capture_rejects_a_cursor_blinking_backwards()[source]¶
Seconds run forwards, here as everywhere else.
- tests.test_screenshots.test_screenshot_cursor_options_need_their_partner(invoke, tmp_path, arguments, message)[source]¶
Each knob names the one it decorates, rather than passing unnoticed.
- tests.test_screenshots.ORCHARD_SCHEME = {'background': '#1E1E2E', 'black': '#45475A', 'blue': '#89B4FA', 'brightBlack': '#585B70', 'brightBlue': '#74A8FC', 'brightCyan': '#6BD7CA', 'brightGreen': '#89D88B', 'brightPurple': '#F2AEDE', 'brightRed': '#F37799', 'brightWhite': '#A6ADC8', 'brightYellow': '#EBD391', 'cyan': '#94E2D5', 'foreground': '#CDD6F4', 'green': '#A6E3A1', 'name': 'Orchard Night', 'purple': '#F5C2E7', 'red': '#F38BA8', 'white': '#BAC2DE', 'yellow': '#F9E2AF'}¶
A Windows Terminal color scheme, shaped like the ones iTerm2-Color-Schemes publishes.
- tests.test_screenshots.iterm_scheme(scheme)[source]¶
The same scheme as iTerm2 writes it: each color as three fractions.
- tests.test_screenshots.test_read_palette_reads_a_windows_terminal_scheme(tmp_path)[source]¶
Each color lands in its slot, magenta read under Windows Terminal’s name.
- tests.test_screenshots.test_read_palette_reads_an_iterm_scheme_as_its_twin(tmp_path)[source]¶
The same scheme reads the same, whichever terminal it was written for.
- tests.test_screenshots.test_read_palette_refuses_what_is_no_scheme(tmp_path, name, content, message)[source]¶
A file read as a scheme says what it lacks, rather than drawing black.
- tests.test_screenshots.test_read_palette_refuses_an_iterm_component_out_of_range(tmp_path, component)[source]¶
A color fraction past
1, or that is no number, names the color it spoils.
- tests.test_screenshots.test_parse_font_stack(value, expected)[source]¶
Families come back single-quoted where spaced, closed on a generic one.
- tests.test_screenshots.test_parse_font_stack_refuses_what_would_break_the_stylesheet(value)[source]¶
No family, or a character that would end the stylesheet, is refused.
- tests.test_screenshots.test_render_font_stack_wins_over_the_preset()[source]¶
A stated font stack replaces the preset’s, which keeps the rest.
- tests.test_screenshots.test_screenshot_draws_with_a_scheme_and_fonts_of_its_own(invoke, tmp_path)[source]¶
--paletteand--fontreach the picture, colors and text alike.
- tests.test_screenshots.test_screenshot_reports_a_file_that_is_no_scheme(invoke, tmp_path)[source]¶
A scheme that cannot be read stops the capture before it runs anything.
- tests.test_screenshots.test_screenshot_draws_a_cursor_when_asked(invoke, tmp_path)[source]¶
--cursorputs one on a still capture, blinking on one clock.
- tests.test_screenshots.test_screenshot_draws_no_cursor_unless_asked(invoke, tmp_path)[source]¶
The default is what every capture taken before the option showed.
- tests.test_screenshots.test_screenshot_cursor_takes_the_shape_it_names(invoke, tmp_path, shape, width)[source]¶
A named shape overrides whatever the terminal preset would have drawn.
- tests.test_screenshots.test_screenshot_bare_cursor_takes_the_preset_shape(invoke, tmp_path)[source]¶
--cursoralone draws Windows Terminal’s bar under--preset windows.
- tests.test_screenshots.test_screenshot_record_starts_where_asked(invoke, tmp_path)[source]¶
--startdrops the screens a recording opened on.Each screen lasts a second, so the cut half a second into the second one holds however late the first is drawn: it counts from that first screen.
- tests.test_screenshots.test_screenshot_record_refuses_an_end_before_the_start(invoke, tmp_path)[source]¶
A slice that holds nothing is a usage error, before anything runs.
- tests.test_screenshots.test_screenshot_record_ends_a_command_that_waits(invoke, tmp_path)[source]¶
--endstops a command that draws one screen, then waits for a key.The command would sleep for a minute. Its one screen arrives in a single redraw with nothing after it, so only a recorder noting that screen while the stream is quiet knows when the end comes.
- tests.test_screenshots.test_screenshot_record_types_its_prompt(invoke, tmp_path)[source]¶
--typingopens the recording on the command line being typed.
- tests.test_screenshots.test_auto_columns_leaves_room_for_a_cursor()[source]¶
An auto width derives from the text, which always ends on its last cell.
Without the extra cell the cursor wraps onto a row of its own, which is a row holding nothing but a cursor.
- tests.test_screenshots.test_auto_columns_with_a_cursor_on_a_blank_screen(picture)[source]¶
A blank screen shows no cursor, and leaves the width to its floor.
No frame placing a cursor left
max()with the width alone to compare, which raisedTypeError: 'int' object is not iterablefor a command printing nothing under--prompt "".
- tests.test_screenshots.test_a_closing_prompt_belongs_to_the_last_frame_alone()[source]¶
Closing every frame would say the command exited before it had.
Counted rather than located, the sigil landing on a different row in each frame of an animation that grows. A row drawn the same in every frame is drawn once, so an unclosed animation shows its opening sigil a single time and each closed frame adds one of its own: measured at 1, 2 and 5 here.
- tests.test_screenshots.test_append_prompt_closes_a_finished_screen(text, expected)[source]¶
The shell comes back on the row under the output, and on no other.
- tests.test_screenshots.test_append_prompt_takes_the_sigil_its_preset_draws()[source]¶
A capture of Windows Terminal closes on the shell that terminal runs.
- tests.test_screenshots.test_a_closing_prompt_costs_no_height_beside_a_cursor()[source]¶
The cursor already claimed that row: the prompt only fills it.
What makes the pair worth having. A cursor alone leaves a row holding nothing, and the sigil turns it into the shell waiting.
- tests.test_screenshots.test_screenshot_closes_a_still_with_a_prompt(invoke, tmp_path)[source]¶
--closing-promptdraws the shell coming back under the output.
- tests.test_screenshots.test_auto_hold_scales_with_the_final_screen(text, expected)[source]¶
The pause follows the populated lines of the closing screen.
- tests.test_screenshots.test_animated_capture_resolves_an_auto_hold()[source]¶
hold="auto"renders exactly as the resolved pause would.
- tests.test_screenshots.test_animated_capture_rejects_an_unknown_hold_word()[source]¶
A word the annotation forbids still has to fail loudly at runtime.
- tests.test_screenshots.test_animated_capture_rejects_a_negative_pause(pause)[source]¶
A pause runs forward or not at all, whichever end of the cycle it sits on.
- tests.test_screenshots.test_parse_hold(value, expected)[source]¶
A hold is seconds, or the one word asking the final screen to decide.
- tests.test_screenshots.test_parse_hold_rejects(value, message)[source]¶
A hold that is neither seconds nor
autosays what it would take.
- tests.test_screenshots.test_parse_pause(value, expected)[source]¶
A pause is seconds, zero included.
- tests.test_screenshots.test_html_capture_does_not_animate()[source]¶
An HTML capture is selectable text, which has no frame to hide.
The refusal names the format the way a reader writes it, not as the
CaptureFormat.HTMLmember it is held in.
- tests.test_screenshots.test_column_segments(text, expected)[source]¶
A run is cut at its gutters, and each column carries the one it starts on.
- tests.test_screenshots.test_no_capture_places_a_column_by_its_padding()[source]¶
No column in a capture is positioned by the blanks in front of it.
The invariant that lets a capture survive a renderer ignoring
textLength:librsvg(and through itrsvg-convertand ImageMagick) lays every run out at the font’s natural width, so a gutter paid for in glyphs collapses and the columns slide onto each other. Each column carrying its ownxasks the renderer for nothing but coordinates.
- tests.test_screenshots.test_no_capture_clips_through_a_transform()[source]¶
The element a capture’s clip is hung on carries no transform of its own.
A
clipPathinuserSpaceOnUseresolves against “the user coordinate system in place when it is referenced”, and renderers disagree over whether the referencing element’s owntransformcounts. Hung on a translated group, the two readings differ by the translation, and the one that ignores it crops the text partway down the window: what macOS Finder’s thumbnailer does.
- tests.test_screenshots.test_no_capture_hangs_a_filter_on_its_window()[source]¶
The window’s own rectangle carries no filter.
An element whose filter a renderer cannot resolve is an element in error, which the spec answers by not rendering it at all. Hung on the window, a filter costs the background, the frame and the shadow together and leaves the text floating on the page: what macOS Finder’s thumbnailer and ImageMagick both do with a capture built that way.
- tests.test_screenshots.test_capture_states_its_font_outside_the_stylesheet()[source]¶
The terminal text names its face, size and color as attributes too.
A renderer is free to ignore a
<style>block, and several do. The text then falls back to a proportional face at a default size in default black, which is a terminal capture with neither its grid nor its colors.
- tests.test_screenshots.test_every_capture_declares_its_encoding()[source]¶
A capture states UTF-8 outright rather than leaving it to be guessed.
A standalone SVG carries no HTTP header to say so. XML defaults to UTF-8 with no declaration, but WebKit applies its HTML fallback to the document encoding instead, which renders every multi-byte character as mojibake: a full block becomes
â, and a capture of colored output becomes a wall of accented letters in macOS Quick Look.
- tests.test_screenshots.test_every_capture_names_its_generator()[source]¶
A capture names the tool that drew it and its repository.
The credit line is optional, and a project can put its own name there: this comment is then all that traces the image back to Click Extra.
- tests.test_screenshots.test_every_capture_states_its_size()[source]¶
The root of a capture gives the
widthandheightof itsviewBox.With only a
viewBox, a browser fits the image into its 300 by 150 default box: GitHub’s image upload writes that size into the<img>tag it inserts, and a table cell sized by its content draws the image 0 pixels wide.
- tests.test_screenshots.test_no_capture_fetches_a_font()[source]¶
A capture resolves its fonts locally, or falls back down its own stack.
A committed image is read offline, on a page forbidding third-party requests, and by renderers that speak no
@font-face.
- tests.test_screenshots.test_wide_glyphs_are_sized_by_cell(text, characters, cells)[source]¶
A run is drawn as wide as the cells it occupies, not its character count.
A CJK ideograph takes two terminal cells, so sizing a run by
len()squeezes it to half its width and stacks the glyphs on each other.
- tests.test_screenshots.test_capture_output_forces_color_and_pins_width(monkeypatch)[source]¶
A capture overrides the environment’s color opt-out and terminal width.
- tests.test_screenshots.test_capture_output_states_the_terminal_it_simulates(background, monkeypatch)[source]¶
The chrome reaches the command as the variables a terminal would set.
Which is what lets a CLI asking for
--theme autorender for the window its capture lands in, instead of falling back to dark inside a light one.
- tests.test_screenshots.test_capture_output_hides_the_terminal_it_runs_from(variable, monkeypatch)[source]¶
The terminal taking the capture never reaches the command captured.
Left through, a command tailoring its output to that terminal draws one picture on the machine that took the capture and another everywhere else, which no committed asset survives.
- tests.test_screenshots.test_capture_output_keeps_stderr_out_unless_asked()[source]¶
Only
stdoutis captured by default, so a wrapper’s chatter stays out.
- tests.test_screenshots.CAPTURE_CLICK_VERSION = (8, 5)¶
Click release whose help layout the committed captures picture.
A capture is a picture of one Click’s output, so a matrix cell running another Click compares it against a screen laid out differently: Click
8.5.0gave positional arguments a section of their own, and Click8.6.0no longer breaks a line after a hyphen. TheClick releasedcells still check every committed capture, which is where the check belongs.
- tests.test_screenshots.test_committed_capture_matches_cli(committed)[source]¶
Every committed capture still pictures what its command prints today.
The capture is reshot through
capture(), the very pipeline that produced the committed file, and the two are compared as terminal text. Going through the whole pipeline rather than against the command’s raw output is what keeps the check honest on both counts the two differ:a command wrapping to an 80-column terminal is handed
min(columns, max_width) - 2, while Click’s ownCliRunnerpinsFORCED_WIDTHto 80, so an in-process render sits two columns wider;the renderer folds a line longer than the terminal, exactly as a terminal does, so a help screen carrying an unwrappable option list (
--table-formatand its 463-character choice list) occupies more rows in the image than the command printed.
Only the text is compared, so restyling a theme does not redden this.
- tests.test_screenshots.test_capture_format_from_path(filename, expected)[source]¶
A capture’s format is read off the file name it is written under.
- tests.test_screenshots.test_capture_format_from_path_rejects_an_unknown_extension(filename)[source]¶
An extension naming no format says which ones do.
- tests.test_screenshots.test_capture_format_from_path_reads_a_file_named_dash_as_a_file(tmp_path)[source]¶
Only a bare
-is the terminal: a file called-has an extension to lack.--output ./-reaches here resolved to an absolute path, and the file it names is as nameable as any other.
- tests.test_screenshots.test_deliver_capture_writes_a_file_named_dash(tmp_path, capsys)[source]¶
A resolved
-is a file to write, not the terminal to print on.
- tests.test_screenshots.test_screenshot_does_not_print_a_resolved_dash(invoke)[source]¶
--output ./-is a file in the working directory, which names no format.Click resolves it to an absolute path whose last component is
-, which is not the bare-naming the terminal.
- tests.test_screenshots.test_render_draws_on_the_chrome_it_is_given(format, background, expected, unwanted)[source]¶
Both renderers answer to the chrome, so a light capture stays readable.
The colors are the contract: an SVG paints its window rect with them, and an HTML capture inlines them on its
<pre>.
- tests.test_screenshots.test_render_frames_with_a_border_its_chrome_can_show(background)[source]¶
Each chrome frames its window in something its own background shows.
The regression this guards is a light capture keeping the translucent white a dark renderer draws by default: a white window on a white page, whose shape is left for the reader to infer from the text inside it.
- tests.test_screenshots.test_chrome_resolves_what_the_capture_draws(background)[source]¶
Nonefields take the background’s and the preset’s own; stated ones stay.
- tests.test_screenshots.test_capture_functions_take_one_chrome(function)[source]¶
The window is one
chromeargument everywhere, with one default.
- tests.test_screenshots.test_renderers_take_one_resolved_chrome(renderer)[source]¶
The two renderers take the window as one chrome, bare unless stated.
A renderer draws the values it is given, so it refuses a chrome still carrying a
Nonethat onlyresolve()can fill.
- tests.test_screenshots.test_bare_chrome_is_resolved(background)[source]¶
The renderers’ default draws as it stands: resolving it changes nothing.
- tests.test_screenshots.test_render_rejects_an_unknown_argument()[source]¶
A typo is still refused, as a signature naming every argument would.
- tests.test_screenshots.test_render_paints_what_it_is_given()[source]¶
A caller’s own frame and shadow reach the window.
- tests.test_screenshots.test_render_states_the_whole_window()[source]¶
Corner radius, frame thickness, backdrop and title all reach the source.
- tests.test_screenshots.test_gradient_svg(backdrop, expected)[source]¶
A CSS gradient becomes a paint server; anything else stays a color.
- tests.test_screenshots.test_gradient_svg_places_the_line_in_user_space(value, expected)[source]¶
The gradient line runs through the center, at the angle asked for.
- tests.test_screenshots.test_render_paints_a_gradient_backdrop()[source]¶
A gradient backdrop reaches the capture as a declared paint server.
- tests.test_screenshots.test_number_lines(text, expected)[source]¶
Each line gets its number, right-aligned on the widest one.
- tests.test_screenshots.test_preset_catalog(name)[source]¶
Every preset carries a full palette on both of its dresses.
- tests.test_screenshots.test_palette_color(color, expected)[source]¶
A style’s color resolves against the palette only where it names a slot.
- tests.test_screenshots.test_palette_color_rejects_a_value_naming_no_color(color)[source]¶
A value that is not a color cannot silently paint something.
A
boolis anint, and names no palette slot for all that.
- tests.test_screenshots.test_blend(ratio, expected)[source]¶
Dim text is mixed toward the background rather than made transparent.
- tests.test_screenshots.test_grid_wraps_at_the_terminal_edge()[source]¶
A line reaching past the last column continues on the next row.
Cropping it would drop text the command printed, and a capture is evidence of what ran.
- tests.test_screenshots.test_grid_marks_each_fold_with_its_wrap_marker()[source]¶
A marked fold closes its row on the marker, painted as a mark of the layout.
The marker takes the last cell of the row it closes, so each folded row holds one cell less of text, and the last row of the line carries none: nothing continues past it.
- tests.test_screenshots.test_grid_without_a_wrap_marker_folds_a_full_row_silently()[source]¶
No marker means the terminal’s own fold: a line exactly as wide fits.
- tests.test_screenshots.test_grid_never_splits_a_wide_glyph()[source]¶
A wide glyph straddling the last column moves down whole.
- tests.test_screenshots.test_grid_keeps_a_glyph_wider_than_the_grid()[source]¶
A glyph too wide for the whole grid is drawn rather than wrapped forever.
- tests.test_screenshots.test_window_buttons(name, expected, unwanted)[source]¶
Each preset draws the decorations its desktop does, or none at all.
- tests.test_screenshots.test_render_draws_the_preset_it_is_given()[source]¶
A preset reaches the capture: its palette, its font, its decorations.
- tests.test_screenshots.test_preset_paints_its_own_titlebar(name)[source]¶
A window drawn as a desktop’s carries that desktop’s chrome on top.
- tests.test_screenshots.test_titlebar_collapses_on_a_window_wearing_nothing()[source]¶
An empty strip is dropped, and comes back as soon as it holds something.
- tests.test_screenshots.test_render_thins_the_window_out(format, expected)[source]¶
Opacity below one lets whatever the capture sits on through its body.
- tests.test_screenshots.DRAWN_FORMATS = (CaptureFormat.HTML, CaptureFormat.SVG)¶
The formats that draw a document around the captured text.
ANSIis the one that does not: it hands a terminal the stream it was already carrying, so there is no margin to credit in and nothing a window option could describe. Everything below asking about a window therefore asks it of these two.
- tests.test_screenshots.test_render_credits_what_drew_it(format)[source]¶
Every capture carries the mark, in the space around the terminal.
- tests.test_screenshots.test_watermark_links_the_package_name(format)[source]¶
The credit points a reader holding only the image back at the docs.
- tests.test_screenshots.test_watermark_leaves_a_borrowed_credit_unlinked(format)[source]¶
A project crediting itself has no click-extra to point anywhere.
- tests.test_screenshots.test_watermark_is_not_terminal_text()[source]¶
The mark is chrome, so reading a capture back does not collect it.
- tests.test_screenshots.test_watermark_sits_where_the_margin_is()[source]¶
It is drawn against the image’s own corner, wherever the margin puts it.
- tests.test_screenshots.test_render_draws_neither_when_asked_for_neither()[source]¶
noneis the value that leaves the window bare.
- tests.test_screenshots.test_render_geometry(margin, padding)[source]¶
Margin grows the image alone; padding grows the window inside it too.
Neither moves a glyph relative to the others: the capture is repositioned as a whole, so its text still reads back line by line.
- tests.test_screenshots.test_render_html_escapes_the_captured_text()[source]¶
Markup a CLI prints is escaped, not handed to the browser as markup.
The load-bearing test of the HTML renderer:
ansi_to_html()translates ANSI and copies everything else verbatim, so a caller skipping the escape turns click-extra’s own--export-confighelp, which says it writesto <stdout>, into an unclosed tag.
- tests.test_screenshots.test_render_html_round_trips_the_terminal_text()[source]¶
Stripping the markup back off returns exactly what the CLI printed.
The HTML counterpart of
svg_to_lines(): it catches a dropped character, a mangled escape and a stray tag in one assertion.
- tests.test_screenshots.test_render_html_fragment_is_self_contained()[source]¶
A fragment carries its own styling, and no document scaffolding.
- tests.test_screenshots.test_render_html_document_wraps_the_fragment()[source]¶
A full document is the fragment plus scaffolding, nothing else.
- tests.test_screenshots.test_render_html_quotes_survive_the_style_attribute()[source]¶
The font stack cannot terminate the
styleattribute it sits in.A double-quoted family name would close the attribute early and spill CSS into the markup, so the stack is single-quoted.
- tests.test_screenshots.css_rects(declarations)[source]¶
The rectangles a
block_css()box paints.Read back off its background layers, in eighths of a cell, the unit of
BLOCK_ELEMENTS.
- tests.test_screenshots.test_block_css_paints_the_shape_of_its_character(char)[source]¶
The CSS of a block element paints the rectangles its shape names.
- tests.test_screenshots.test_render_html_draws_each_box_run_as_one_svg()[source]¶
A run of Box Drawing is one box holding the run’s lines as an SVG.
One SVG per run rather than a background per cell, so a rule merges into one line, and the characters stay in the text.
- tests.test_screenshots.test_braille_css_draws_one_disc_per_dot(code)[source]¶
The CSS of a Braille pattern paints a disc for each dot it raises.
- tests.test_screenshots.test_render_html_draws_shapes()[source]¶
Every shape sits in a box drawing it, whatever its run’s style.
Its glyphs stay in the text, so the capture still reads back as the terminal text, and the run keeps the colors it came with.
- tests.test_screenshots.test_render_html_keeps_a_joined_shape_in_its_cluster()[source]¶
A shape after a zero width joiner stays in the text, as in an SVG capture.
- tests.test_screenshots.test_fit_columns(text, expected)[source]¶
The width
autoresolves to is the longest line, floored by the caller.
- tests.test_screenshots.test_render_auto_columns_folds_nothing()[source]¶
autolays the image out at what the text asks for.A line the command does not wrap on its own (a prompt, a wide table) is folded by a pinned width and kept whole by this one.
- tests.test_screenshots.test_screenshot_rejects_an_unusable_width(invoke, tmp_path, value, message)[source]¶
--columnstakes a width or the one word standing for none of them.
- tests.test_screenshots.test_parse_columns(value, expected)[source]¶
A width is an integer, or the one word leaving it to the text.
- tests.test_screenshots.test_parse_columns_rejects(value, message)[source]¶
A width that is neither says what it would take.
- tests.test_screenshots.test_screenshot_rejects_an_unusable_hold(invoke, tmp_path, value, message)[source]¶
A bad
--holdis reported against the option, like a bad--columns.The prefix is what tells a reader which of a dozen options to fix.
- tests.test_screenshots.test_capture_environment(columns, pinned)[source]¶
The command is told the chrome, denied the terminal, and given its width.
- tests.test_screenshots.test_screenshot_pacing_needs_record(invoke, tmp_path, arguments, message)[source]¶
The pacing knobs describe a recording, so a still refuses them.
- tests.test_screenshots.test_screenshot_record_rejects_still_only_arrangements(invoke, tmp_path, arguments, output_name, message)[source]¶
A recording is an animated SVG of whole screens at a pinned width.
- tests.test_screenshots.test_screenshot_record_writes_an_animation(invoke, tmp_path)[source]¶
--recordlands an animated SVG named after its output stem.
- tests.test_screenshots.test_screenshot_reports_a_command_that_cannot_start(invoke, monkeypatch, tmp_path, mode, program)[source]¶
A command the system refuses to start is an error line, not a traceback.
Only the start of the line is pinned: the reason closing it is the system’s own, and it differs between platforms.
- tests.test_screenshots.test_screenshot_reports_a_command_outliving_its_timeout(invoke, tmp_path)[source]¶
A command still running when
--timeoutends is an error line.The command is killed, and nothing is written.
- tests.test_screenshots.test_screenshot_wrap_needs_the_console_script(invoke, monkeypatch, tmp_path)[source]¶
--wraprefuses to re-enter through anything but the installed command.python -m click_extraresolves a target differently, so falling back to it would capture a different CLI than the composition it stands for. Better to say so than to quietly picture the wrong thing.
- tests.test_screenshots.test_screenshot_wrap_matches_the_composition(invoke, tmp_path)[source]¶
--wrapis the nested composition, spelled as a flag.Captured both ways, the terminal text has to match: the flag is a shortcut, not a second way of rendering.
- tests.test_screenshots.test_ansi_capture_is_the_text_it_was_given()[source]¶
The one format that renders nothing: a terminal reads the stream itself.
- tests.test_screenshots.test_ansi_capture_draws_no_window()[source]¶
None of the window options reach a format that has no window.
- tests.test_screenshots.test_ansi_capture_bands_an_emphasized_row()[source]¶
A terminal has no behind, so the band is the row’s own background.
- tests.test_screenshots.test_ansi_band_survives_a_reset_inside_the_row()[source]¶
Restated after every escape, or the band stops at the first keyword.
Pygments closes a colored run with a full reset, which clears the background along with the ink it was closing.
- tests.test_screenshots.test_ansi_capture_does_not_animate()[source]¶
There is no frame to hide in a stream a terminal paints as it arrives.
- tests.test_screenshots.test_render_dresses_an_html_capture_in_the_preset_font_alone()[source]¶
A preset’s font reaches an HTML capture, and its title bar stays the SVG’s.
The buttons and the strip they sit in are drawn by the SVG alone: an HTML capture reflows with the page embedding it, and has no window to seat them.