()
| 571 | |
| 572 | #[test] |
| 573 | fn test_extract_module_variables() { |
| 574 | let mut parser = PythonParser::new(); |
| 575 | let source = r#" |
| 576 | default_config = {"timeout": 30} |
| 577 | "#; |
| 578 | let entities = parser.extract(source, "config.py"); |
| 579 | let cfg = entities.iter().find(|e| e.name == "default_config"); |
| 580 | assert!(cfg.is_some(), "Should find default_config"); |
| 581 | assert_eq!(cfg.unwrap().kind, EntityKind::Variable); |
| 582 | } |
| 583 | |
| 584 | #[test] |
| 585 | fn test_extract_imports() { |