planners: better test codecov
//
// Code is licensed under AGPL License, Version 3.0.
+
+#[test]
+fn test_sql_to_plan() {
use std::path::PathBuf;
use std::{ffi::OsStr, fs, io};
+ use std::sync::Arc;
+ use std::{env, fmt::Write};
+
+ use pretty_assertions::assert_eq;
+ use sqlparser::dialect::GenericDialect;
+ use sqlparser::parser::Parser;
+
+ use super::planner::Planner;
+ use crate::contexts::Context;
+ use crate::datasources::{MemoryProvider, MemoryTable};
+ use crate::datavalues::{DataField, DataSchema, DataType};
-#[allow(dead_code)]
fn list_of_testdata_paths(root: &str) -> io::Result<Vec<PathBuf>> {
let mut result = vec![];
@@ -18,19 +31,6 @@ fn list_of_testdata_paths(root: &str) -> io::Result<Vec<PathBuf>> {
Ok(result)
}
-#[test]
-fn test_sql_to_plan() {
- use pretty_assertions::assert_eq;
- use sqlparser::dialect::GenericDialect;
- use sqlparser::parser::Parser;
- use std::sync::Arc;
- use std::{env, fmt::Write};
-
- use super::planner::Planner;
- use crate::contexts::Context;
- use crate::datasources::{MemoryProvider, MemoryTable};
- use crate::datavalues::{DataField, DataSchema, DataType};
-
let test_path = format!(
"{}/src/planners/tests/",
env::current_dir().unwrap().display()
