Skip to content

Commit f96942b

Browse files
committed
use super::* from tests submodules
1 parent f628a3f commit f96942b

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

compiler/ast/src/constant.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
133133

134134
#[cfg(test)]
135135
mod tests {
136+
use super::*;
137+
136138
#[cfg(feature = "constant-optimization")]
137139
#[test]
138140
fn test_constant_opt() {
139-
use super::*;
140-
use crate::fold::Fold;
141-
use crate::*;
141+
use crate::{fold::Fold, *};
142142

143143
let start = Default::default();
144144
let end = None;

compiler/codegen/src/compile.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2843,9 +2843,7 @@ fn compile_constant(value: &ast::Constant) -> ConstantData {
28432843

28442844
#[cfg(test)]
28452845
mod tests {
2846-
use super::{CompileOpts, Compiler};
2847-
use crate::symboltable::SymbolTable;
2848-
use rustpython_compiler_core::CodeObject;
2846+
use super::*;
28492847
use rustpython_parser as parser;
28502848

28512849
fn compile_exec(source: &str) -> CodeObject {

compiler/core/src/location.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Location {
9696

9797
#[cfg(test)]
9898
mod tests {
99-
use crate::Location;
99+
use super::*;
100100

101101
#[test]
102102
fn test_gt() {

compiler/parser/src/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn is_starred(exp: &ast::Expr) -> bool {
151151

152152
#[cfg(test)]
153153
mod tests {
154-
use crate::lexer::LexicalErrorType;
154+
use super::*;
155155
use crate::parser::{parse_program, ParseErrorType};
156156

157157
macro_rules! function_and_lambda {

vm/src/dictdatatype.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,9 +883,8 @@ fn str_exact<'a>(obj: &'a PyObject, vm: &VirtualMachine) -> Option<&'a PyStr> {
883883

884884
#[cfg(test)]
885885
mod tests {
886-
use super::{Dict, DictKey};
887-
use crate::common::ascii;
888-
use crate::Interpreter;
886+
use super::*;
887+
use crate::{common::ascii, Interpreter};
889888

890889
#[test]
891890
fn test_insert() {

vm/src/object/core.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,7 @@ pub(crate) fn init_type_hierarchy() -> (PyTypeRef, PyTypeRef, PyTypeRef) {
12141214
#[cfg(test)]
12151215
mod tests {
12161216
use super::*;
1217+
12171218
#[test]
12181219
fn miri_test_type_initialization() {
12191220
let _ = init_type_hierarchy();

0 commit comments

Comments
 (0)