Skip to content

Commit a3c6bfe

Browse files
committed
[IMP] tests for OLS02002
1 parent c21ccae commit a3c6bfe

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .ols02002_2 import a # OLS02002
2+
from .ols02002_2 import b # OLS02002
3+
from .ols02002_2 import *
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .ols02002 import a
2+
from .ols02002 import *

server/tests/diagnostics/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ pub mod ols01008;
1111
pub mod ols01009;
1212
pub mod ols01010;
1313
pub mod ols02001;
14+
pub mod ols02002;
1415
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_ols02002() {
9+
let mut odoo = setup_server(false);
10+
let path = env::current_dir().unwrap().join("tests/data/python/diagnostics/ols02002.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)