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

Source from the content-addressed store, hash-verified

849 /// Test cleanup_on_error function.
850 #[test]
851 fn test_cleanup_on_error() {
852 let temp = tempdir().unwrap();
853 let target = temp.path().join("failed-clone");
854
855 std::fs::create_dir(&target).unwrap();
856 assert!(target.exists());
857
858 cleanup_on_error(&target);
859
860 assert!(!target.exists());
861 }
862
863 /// Test cleanup_on_error with non-existent path.
864 #[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