Skip to content

Commit c21ccae

Browse files
committed
[IMP] tests for OLS02001
1 parent a521a4c commit c21ccae

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import dscsqdcd # OLS02001
2+
import os
3+
import sys
4+
5+
from trucmuche import MachinChose # OLS02001
6+
from os import path

server/tests/diagnostics/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ pub mod ols01007;
1010
pub mod ols01008;
1111
pub mod ols01009;
1212
pub mod ols01010;
13+
pub mod ols02001;
1314
pub mod ols0500_00_12;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use std::env;
2+
3+
use odoo_ls_server::utils::PathSanitizer;
4+
5+
use crate::{setup::setup::*, test_utils::{verify_diagnostics_against_doc}};
6+
7+
#[test]
8+
fn test_ols02001() {
9+
let mut odoo = setup_server(false);
10+
let path = env::current_dir().unwrap().join("tests/data/python/diagnostics/ols02001.py").sanitize();
11+
let mut session = prepare_custom_entry_point(&mut odoo, &path);
12+
let diagnostics = get_diagnostics_for_path(&mut session, &path);
13+
let doc_diags = get_diagnostics_test_comments(&mut session, &path);
14+
verify_diagnostics_against_doc(diagnostics, doc_diags);
15+
}

0 commit comments

Comments
 (0)