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

Function test_decorated_function

atomic-semantic/src/parsers/python.rs:603–619  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

601
602 #[test]
603 fn test_decorated_function() {
604 let mut parser = PythonParser::new();
605 let source = r#"
606@app.route("/api/users")
607def get_users():
608 pass
609
610@staticmethod
611def helper():
612 pass
613"#;
614 let entities = parser.extract(source, "routes.py");
615 assert!(
616 entities.iter().any(|e| e.name == "get_users"),
617 "Should find decorated function get_users"
618 );
619 }
620
621 #[test]
622 fn test_decorated_class() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected