@@ -223,6 +223,7 @@ class TestFileManager : XCTestCase {
223
223
} catch let e {
224
224
XCTFail ( " \( e) " )
225
225
}
226
+ try ? fm. removeItem ( atPath: path)
226
227
}
227
228
228
229
func test_isWritableFile( ) {
@@ -243,6 +244,7 @@ class TestFileManager : XCTestCase {
243
244
} catch let e {
244
245
XCTFail ( " \( e) " )
245
246
}
247
+ try ? fm. removeItem ( atPath: path)
246
248
}
247
249
248
250
func test_isExecutableFile( ) {
@@ -268,6 +270,7 @@ class TestFileManager : XCTestCase {
268
270
} catch let e {
269
271
XCTFail ( " \( e) " )
270
272
}
273
+ try ? fm. removeItem ( atPath: path)
271
274
}
272
275
273
276
func test_isDeletableFile( ) {
@@ -288,6 +291,8 @@ class TestFileManager : XCTestCase {
288
291
// test deletable if parent directory has all necessary permissions
289
292
try fm. setAttributes ( [ . posixPermissions : NSNumber ( value: Int16 ( 0o0755 ) ) ] , ofItemAtPath: dir_path)
290
293
XCTAssertTrue ( fm. isDeletableFile ( atPath: file_path) )
294
+
295
+ try ? fm. removeItem ( atPath: dir_path)
291
296
}
292
297
catch { XCTFail ( " \( error) " ) }
293
298
@@ -510,6 +515,7 @@ class TestFileManager : XCTestCase {
510
515
} else {
511
516
XCTFail ( )
512
517
}
518
+ try ? fm. removeItem ( atPath: basePath)
513
519
}
514
520
515
521
func test_directoryEnumerator( ) {
@@ -854,6 +860,7 @@ class TestFileManager : XCTestCase {
854
860
} catch {
855
861
// ignore
856
862
}
863
+ cleanup ( )
857
864
}
858
865
859
866
func test_linkItemAtPathToPath( ) {
0 commit comments