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:539–552  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

537
538 #[test]
539 fn test_extract_class_with_bases() {
540 let mut parser = PythonParser::new();
541 let source = r#"
542class Admin(User, Serializable):
543 pass
544"#;
545 let entities = parser.extract(source, "models.py");
546 let admin = entities.iter().find(|e| e.name == "Admin").unwrap();
547 assert!(
548 admin.signature.as_ref().unwrap().contains("User"),
549 "Signature should include base classes: {:?}",
550 admin.signature
551 );
552 }
553
554 #[test]
555 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