()
| 620 | |
| 621 | #[test] |
| 622 | fn test_decorated_class() { |
| 623 | let mut parser = PythonParser::new(); |
| 624 | let source = r#" |
| 625 | @dataclass |
| 626 | class Config: |
| 627 | host: str |
| 628 | port: int = 8080 |
| 629 | "#; |
| 630 | let entities = parser.extract(source, "config.py"); |
| 631 | assert!(entities |
| 632 | .iter() |
| 633 | .any(|e| e.name == "Config" && e.kind == EntityKind::Class)); |
| 634 | } |
| 635 | |
| 636 | #[test] |
| 637 | fn test_empty_source() { |