Skip to content

Commit

Permalink
optimize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YuliaProkopovych committed May 3, 2024
1 parent 5512c30 commit d4e3346
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
8 changes: 4 additions & 4 deletions module/move/optimization_tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ full = [
"enabled",
]
enabled = []
rapidity_6 = [] # to enable slow tests
static_plot = []
dynamic_plot = [ "static_plot", "dep:plotters-backend", "dep:piston_window" ]
# rapidity_6 = [] # to enable slow tests
# static_plot = []
plotting = [ "dep:plotters-backend", "dep:piston_window" ]
lp_parse = [ "dep:exmex" ]

[dependencies]
Expand All @@ -48,7 +48,7 @@ rand = "0.8.5"
statrs = "0.16.0"
faer = { version = "0.16.0", features = [ "ndarray" ] }
ndarray = "0.15.6"
plotters = { version = "0.3.5", default-features=false, features = [
plotters = { version = "0.3.5", default-features = false, features = [
"bitmap_encoder",
"ttf",
"area_series",
Expand Down
2 changes: 1 addition & 1 deletion module/move/optimization_tools/src/hybrid_optimizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!

use crate::*;
#[ cfg( feature="static_plot" ) ]
#[ cfg( feature="plotting" ) ]
use crate::plot::{ PlotDescription, PlotOptions, plot };
use iter_tools::Itertools;
use std::ops::RangeInclusive;
Expand Down
4 changes: 2 additions & 2 deletions module/move/optimization_tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod problems;
pub mod hybrid_optimizer;
pub mod simplex;
pub mod optimal_params_search;
#[ cfg( feature="static_plot" ) ]
#[ cfg( feature="plotting" ) ]
pub mod plot;
#[ cfg( feature="dynamic_plot" ) ]
#[ cfg( feature="plotting" ) ]
pub mod plot_dynamic;
3 changes: 1 addition & 2 deletions module/move/optimization_tools/tests/ga_optimization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ fn crossover()
///
/// # Usage
///
/// cargo test solve_with_ga --release --features rapidity_6
/// cargo test solve_with_ga --release
///
#[ cfg( feature = "rapidity_6" ) ]
#[ ignore ]
#[ test ]
fn solve_with_ga()
Expand Down
9 changes: 3 additions & 6 deletions module/move/optimization_tools/tests/optimization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ fn initial_temperature()
///
/// # Usage
///
/// cargo test solve_with_sa --release --features rapidity_6
/// cargo test solve_with_sa --release
///
#[ cfg( feature = "rapidity_6" ) ]
#[ ignore ]
#[ test ]
fn solve_with_sa()
Expand Down Expand Up @@ -104,9 +103,8 @@ fn solve_with_sa()
///
/// # Usage
///
/// cargo test solve_empty_full_block --release --features rapidity_6
/// cargo test solve_empty_full_block --release
///
#[ cfg( feature = "rapidity_6" ) ]
#[ ignore ]
#[ test ]
fn solve_empty_full_block()
Expand Down Expand Up @@ -181,9 +179,8 @@ fn solve_empty_full_block()
///
/// # Usage
///
/// cargo test time_measure --release --features rapidity_6
/// cargo test time_measure --release
///
#[ cfg( feature = "rapidity_6" ) ]
#[ ignore ]
#[ test ]
fn time_measure()
Expand Down

0 comments on commit d4e3346

Please sign in to comment.