pub struct NotebookTester { /* private fields */ }Expand description
Main notebook testing struct
Implementations§
Source§impl NotebookTester
impl NotebookTester
Sourcepub fn new() -> Self
pub fn new() -> Self
§Examples
use ruchy::notebook::testing::tester::NotebookTester;
let instance = NotebookTester::new();
// Verify behavior§Examples
use ruchy::notebook::testing::tester::NotebookTester;
let instance = NotebookTester::new();
// Verify behavior§Examples
use ruchy::notebook::testing::tester::NotebookTester;
let instance = NotebookTester::new();
// Verify behaviorSourcepub fn with_config(config: TestConfig) -> Self
pub fn with_config(config: TestConfig) -> Self
§Examples
use ruchy::notebook::testing::tester::NotebookTester;
let mut instance = NotebookTester::new();
let result = instance.with_config();
// Verify behaviorSourcepub fn execute_cell(&mut self, cell: &Cell) -> Result<CellOutput, String>
pub fn execute_cell(&mut self, cell: &Cell) -> Result<CellOutput, String>
§Examples
use ruchy::notebook::testing::tester::NotebookTester;
let mut instance = NotebookTester::new();
let result = instance.execute_cell();
// Verify behaviorSourcepub fn cell_count(&self) -> usize
pub fn cell_count(&self) -> usize
§Examples
use ruchy::notebook::testing::tester::NotebookTester;
let mut instance = NotebookTester::new();
let result = instance.cell_count();
// Verify behaviorSourcepub fn compare_outputs(
&self,
actual: &CellOutput,
expected: &CellOutput,
tolerance: Option<f64>,
) -> TestResult
pub fn compare_outputs( &self, actual: &CellOutput, expected: &CellOutput, tolerance: Option<f64>, ) -> TestResult
Sourcepub fn compare_dataframes(
&self,
df1: &CellOutput,
df2: &CellOutput,
tolerance: f64,
) -> TestResult
pub fn compare_dataframes( &self, df1: &CellOutput, df2: &CellOutput, tolerance: f64, ) -> TestResult
pub fn test_file(&self, path: &Path) -> Result<TestReport>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NotebookTester
impl !RefUnwindSafe for NotebookTester
impl !Send for NotebookTester
impl !Sync for NotebookTester
impl Unpin for NotebookTester
impl !UnwindSafe for NotebookTester
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more