MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_extract_python

Function test_extract_python

atomic-semantic/src/parsers/mod.rs:554–564  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

552
553 #[test]
554 fn test_extract_python() {
555 let mut registry = ParserRegistry::new();
556 let source = "def greet(name: str) -> str:\n return f'Hello, {name}!'\n\nclass UserService:\n pass\n";
557 let entities = registry.extract("main.py", source);
558 assert!(!entities.is_empty());
559 assert!(
560 entities.iter().any(|e| e.name == "greet"),
561 "Should find greet function, got: {:?}",
562 entities.iter().map(|e| &e.name).collect::<Vec<_>>()
563 );
564 }
565
566 #[test]
567 fn test_extract_rust() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected