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

Function test_cleanup_on_error

atomic-cli/src/commands/clone/helpers.rs:710–720  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

708 /// Test cleanup_on_error function.
709 #[test]
710 fn test_cleanup_on_error() {
711 let temp = tempdir().unwrap();
712 let target = temp.path().join("failed-clone");
713
714 std::fs::create_dir(&target).unwrap();
715 assert!(target.exists());
716
717 cleanup_on_error(&target);
718
719 assert!(!target.exists());
720 }
721
722 /// Test cleanup_on_error with non-existent path.
723 #[test]

Callers

nothing calls this directly

Calls 3

cleanup_on_errorFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected