mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
use super::* from tests submodules
This commit is contained in:
@@ -133,12 +133,12 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[cfg(feature = "constant-optimization")]
|
||||
#[test]
|
||||
fn test_constant_opt() {
|
||||
use super::*;
|
||||
use crate::fold::Fold;
|
||||
use crate::*;
|
||||
use crate::{fold::Fold, *};
|
||||
|
||||
let start = Default::default();
|
||||
let end = None;
|
||||
|
||||
@@ -2843,9 +2843,7 @@ fn compile_constant(value: &ast::Constant) -> ConstantData {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{CompileOpts, Compiler};
|
||||
use crate::symboltable::SymbolTable;
|
||||
use rustpython_compiler_core::CodeObject;
|
||||
use super::*;
|
||||
use rustpython_parser as parser;
|
||||
|
||||
fn compile_exec(source: &str) -> CodeObject {
|
||||
|
||||
@@ -96,7 +96,7 @@ impl Location {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::Location;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_gt() {
|
||||
|
||||
@@ -151,7 +151,7 @@ fn is_starred(exp: &ast::Expr) -> bool {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::lexer::LexicalErrorType;
|
||||
use super::*;
|
||||
use crate::parser::{parse_program, ParseErrorType};
|
||||
|
||||
macro_rules! function_and_lambda {
|
||||
|
||||
@@ -883,9 +883,8 @@ fn str_exact<'a>(obj: &'a PyObject, vm: &VirtualMachine) -> Option<&'a PyStr> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{Dict, DictKey};
|
||||
use crate::common::ascii;
|
||||
use crate::Interpreter;
|
||||
use super::*;
|
||||
use crate::{common::ascii, Interpreter};
|
||||
|
||||
#[test]
|
||||
fn test_insert() {
|
||||
|
||||
@@ -1214,6 +1214,7 @@ pub(crate) fn init_type_hierarchy() -> (PyTypeRef, PyTypeRef, PyTypeRef) {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn miri_test_type_initialization() {
|
||||
let _ = init_type_hierarchy();
|
||||
|
||||
Reference in New Issue
Block a user