pub struct TestReport { /* private fields */ }Expand description
A renderable test report: failures first, a per-suite summary table and a total line.
Implementations§
Source§impl TestReport
impl TestReport
pub fn new(run: TestRun) -> Self
Sourcepub fn show_passed(self, show: bool) -> Self
pub fn show_passed(self, show: bool) -> Self
List passing and skipped cases after the failures (default off).
Sourcepub fn show_output(self, show: bool) -> Self
pub fn show_output(self, show: bool) -> Self
Show captured output under failures (default on).
Sourcepub fn diff_context(self, lines: usize) -> Self
pub fn diff_context(self, lines: usize) -> Self
Context lines in expected/actual diffs (default 3).
Trait Implementations§
Source§impl Clone for TestReport
impl Clone for TestReport
Source§impl Debug for TestReport
impl Debug for TestReport
Source§impl Renderable for TestReport
impl Renderable for TestReport
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Source§fn measure(&self, _console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, _console: &Console, options: &ConsoleOptions) -> Measurement
The
(minimum, maximum) cell width this renderable wants. Port of
__rich_measure__. The default is what upstream’s Measurement.get
returns for a renderable without one: anything from nothing to the
whole width, (0, max_width).Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Whether a top-level
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.Source§fn vertical(&self) -> Option<VerticalAlign>
fn vertical(&self) -> Option<VerticalAlign>
The vertical alignment a
Table cell holding this renderable uses in
place of its column’s. Upstream reads getattr(renderable, "vertical", None); Align sets it.Source§fn print_end_line(&self, _options: &ConsoleOptions) -> bool
fn print_end_line(&self, _options: &ConsoleOptions) -> bool
Whether a top-level print ends this renderable’s last line. This
port’s renderables separate lines, where upstream’s end each line
with
"\n", so a print adds the final line break. A renderable
whose upstream output stops without one (Screen, LiveRender, a
Rule whose end has no newline) returns false, and the next
output continues its last line. options are the print’s options.Auto Trait Implementations§
impl Freeze for TestReport
impl RefUnwindSafe for TestReport
impl Send for TestReport
impl Sync for TestReport
impl Unpin for TestReport
impl UnsafeUnpin for TestReport
impl UnwindSafe for TestReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more