()
| 643 | |
| 644 | #[test] |
| 645 | fn test_decorated_class() { |
| 646 | let mut parser = PythonParser::new(); |
| 647 | let source = r#" |
| 648 | @dataclass |
| 649 | class Config: |
| 650 | host: str |
| 651 | port: int = 8080 |
| 652 | "#; |
| 653 | let entities = parser.extract(source, "config.py"); |
| 654 | assert!(entities |
| 655 | .iter() |
| 656 | .any(|e| e.name == "Config" && e.kind == EntityKind::Class)); |
| 657 | } |
| 658 | |
| 659 | #[test] |
| 660 | fn test_empty_source() { |