MCPcopy
hub / github.com/stretchr/testify / TestFileExists

Function TestFileExists

assert/assertions_test.go:2581–2600  ·  assert/assertions_test.go::TestFileExists
(t *testing.T)

Source from the content-addressed store, hash-verified

2579}
2580
2581func TestFileExists(t *testing.T) {
2582 t.Parallel()
2583
2584 mockT := new(testing.T)
2585 True(t, FileExists(mockT, "assertions.go"))
2586
2587 mockT = new(testing.T)
2588 False(t, FileExists(mockT, "random_file"))
2589
2590 mockT = new(testing.T)
2591 False(t, FileExists(mockT, "../_codegen"))
2592
2593 link := getTempSymlinkPath(t, "assertions.go")
2594 mockT = new(testing.T)
2595 True(t, FileExists(mockT, link))
2596
2597 link = getTempSymlinkPath(t, "non_existent_file")
2598 mockT = new(testing.T)
2599 True(t, FileExists(mockT, link))
2600}
2601
2602func TestNoFileExists(t *testing.T) {
2603 t.Parallel()

Callers

nothing calls this directly

Calls 4

getTempSymlinkPathFunction · 0.85
TrueFunction · 0.70
FileExistsFunction · 0.70
FalseFunction · 0.70

Tested by

no test coverage detected