()
| 548 | |
| 549 | #[test] |
| 550 | fn test_extract_module_variables() { |
| 551 | let mut parser = PythonParser::new(); |
| 552 | let source = r#" |
| 553 | default_config = {"timeout": 30} |
| 554 | "#; |
| 555 | let entities = parser.extract(source, "config.py"); |
| 556 | let cfg = entities.iter().find(|e| e.name == "default_config"); |
| 557 | assert!(cfg.is_some(), "Should find default_config"); |
| 558 | assert_eq!(cfg.unwrap().kind, EntityKind::Variable); |
| 559 | } |
| 560 | |
| 561 | #[test] |
| 562 | fn test_extract_imports() { |