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

Function test_extract_class_with_bases

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

Source from the content-addressed store, hash-verified

514
515 #[test]
516 fn test_extract_class_with_bases() {
517 let mut parser = PythonParser::new();
518 let source = r#"
519class Admin(User, Serializable):
520 pass
521"#;
522 let entities = parser.extract(source, "models.py");
523 let admin = entities.iter().find(|e| e.name == "Admin").unwrap();
524 assert!(
525 admin.signature.as_ref().unwrap().contains("User"),
526 "Signature should include base classes: {:?}",
527 admin.signature
528 );
529 }
530
531 #[test]
532 fn test_extract_module_constants() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected