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

Source from the content-addressed store, hash-verified

868 /// Test cleanup_on_error function.
869 #[test]
870 fn test_cleanup_on_error() {
871 let temp = tempdir().unwrap();
872 let target = temp.path().join("failed-clone");
873
874 std::fs::create_dir(&target).unwrap();
875 assert!(target.exists());
876
877 cleanup_on_error(&target);
878
879 assert!(!target.exists());
880 }
881
882 /// Test cleanup_on_error with non-existent path.
883 #[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