File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ def a (* , x ):
2+ pass
3+
4+ a () # OLS01010
5+ a (x = 5 )
6+ a (y = 5 ) # OLS01010, OLS01008
7+
8+ def b (* , x = 5 ):
9+ pass
10+
11+ b ()
12+ b (x = 6 )
13+ b (y = 7 ) # OLS01008
14+
15+ def c (* , x , y , z ):
16+ pass
17+
18+ c (z = 5 ) # OLS01010
19+ c (x = 5 , y = 6 , z = 7 )
20+ c (x = 5 , y = 6 , z = 7 , w = 8 ) # OLS01008
21+ c (z = 5 , y = 5 , x = 5 )
22+ c (y = 5 , z = 5 ) # OLS01010
23+ c (x = 5 , z = 5 ) # OLS01010
24+ c (x = 5 , y = 5 ) # OLS01010
Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ pub mod ols01006;
99pub mod ols01007;
1010pub mod ols01008;
1111pub mod ols01009;
12+ pub mod ols01010;
1213pub mod ols0500_00_12;
Original file line number Diff line number Diff line change 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_ols01010 ( ) {
9+ let mut odoo = setup_server ( false ) ;
10+ let path = env:: current_dir ( ) . unwrap ( ) . join ( "tests/data/python/diagnostics/ols01010.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+ }
You can’t perform that action at this time.
0 commit comments