(&self, spec: &str)
| 174 | } |
| 175 | |
| 176 | fn resolve_canonical(&self, spec: &str) -> Result<Resolved, String> { |
| 177 | let s = self.state.borrow(); |
| 178 | if s.in_flight.contains(spec) { |
| 179 | return Err(format!("circular import: '{}'", spec)); |
| 180 | } |
| 181 | match s.modules.get(spec) { |
| 182 | // Clone so the same module can be re-imported under multiple aliases. |
| 183 | Some(r) => Ok(r.clone()), |
| 184 | None => Err(format!("module '{}' not found in TestResolver", spec)), |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | // Fixture functions. Third arg is the kwargs slot (`None` for positional calls); these fixtures ignore it. |
no test coverage detected