pub struct FixtureManager { /* private fields */ }Expand description
Manages session fixture reuse across test runs.
Implementations§
Source§impl FixtureManager
impl FixtureManager
Sourcepub fn create_session(
&self,
context_id: &str,
repo_path: &Path,
python_path: &Path,
) -> SessionState
pub fn create_session( &self, context_id: &str, repo_path: &Path, python_path: &Path, ) -> SessionState
Create a new session state for a context.
Sourcepub fn get_session(&self, context_id: &str) -> Option<SessionState>
pub fn get_session(&self, context_id: &str) -> Option<SessionState>
Get session state for a context.
Sourcepub fn enable_reuse(&self, context_id: &str) -> bool
pub fn enable_reuse(&self, context_id: &str) -> bool
Enable fixture reuse for a context.
Sourcepub fn disable_reuse(&self, context_id: &str) -> bool
pub fn disable_reuse(&self, context_id: &str) -> bool
Disable fixture reuse and teardown all fixtures.
Sourcepub fn mark_fixture_used(
&self,
context_id: &str,
name: &str,
scope: FixtureScope,
)
pub fn mark_fixture_used( &self, context_id: &str, name: &str, scope: FixtureScope, )
Mark a fixture as used in the current run.
Sourcepub fn mark_run_complete(&self, context_id: &str)
pub fn mark_run_complete(&self, context_id: &str)
Mark a test run as complete.
Sourcepub fn get_stale_fixtures(&self, context_id: &str) -> Vec<String>
pub fn get_stale_fixtures(&self, context_id: &str) -> Vec<String>
Get fixtures that haven’t been used recently.
Sourcepub fn remove_session(&self, context_id: &str)
pub fn remove_session(&self, context_id: &str)
Remove a specific context’s session.
Sourcepub fn session_count(&self) -> usize
pub fn session_count(&self) -> usize
Get session count.
Sourcepub fn configure(&mut self, config: FixtureConfig)
pub fn configure(&mut self, config: FixtureConfig)
Configure fixture reuse settings.
Sourcepub fn get_config(&self) -> &FixtureConfig
pub fn get_config(&self) -> &FixtureConfig
Get current configuration.
Trait Implementations§
Source§impl Clone for FixtureManager
impl Clone for FixtureManager
Source§fn clone(&self) -> FixtureManager
fn clone(&self) -> FixtureManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixtureManager
impl Debug for FixtureManager
Auto Trait Implementations§
impl Freeze for FixtureManager
impl RefUnwindSafe for FixtureManager
impl Send for FixtureManager
impl Sync for FixtureManager
impl Unpin for FixtureManager
impl UnsafeUnpin for FixtureManager
impl UnwindSafe for FixtureManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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