pub struct TestMeta {
pub name: String,
pub file: String,
pub language: String,
pub function: Option<String>,
pub compile: Option<String>,
pub imports: Vec<String>,
pub copy_refs: bool,
pub allowed_imports: Vec<String>,
}Expand description
Metadata for a test spec file.
Fields§
§name: String§file: StringStudent file to test (suffix match, e.g. “Lab5_1.py”).
language: StringLanguage of the student code.
function: Option<String>Function name to call (for function-call tests).
compile: Option<String>Compile command template (for compiled languages). Placeholders: {source}, {output}
imports: Vec<String>Teacher module paths — loaded before student code in chain mode.
Exports (public names) populate the $ref context as live Python objects.
copy_refs: boolWhether to deepcopy $ref args before each case (prevents mutation).
Defaults to true. Set false for large data where copy is expensive.
allowed_imports: Vec<String>Extra packages allowed in student code (beyond safe stdlib).
e.g. ["numpy", "pandas"]. By default only safe stdlib modules are allowed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TestMeta
impl<'de> Deserialize<'de> for TestMeta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TestMeta
impl RefUnwindSafe for TestMeta
impl Send for TestMeta
impl Sync for TestMeta
impl Unpin for TestMeta
impl UnsafeUnpin for TestMeta
impl UnwindSafe for TestMeta
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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