Skip to content

Commit 957c398

Browse files
committed
refac
1 parent 69d7d75 commit 957c398

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

test/unit_tests/IO/ut_logging.jl

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,3 @@ import .Logging_module
6262
Base.CoreLogging.LogLevel}}}
6363
# @test contains(current_logger().loggers[2].logger.stream.name, "<file test_2.1")
6464
end
65-
66-
@testset "close_result_file tests" begin
67-
# Create a sample dictionary with an open file
68-
file_path = "test_output.txt"
69-
file = open(file_path, "w")
70-
result_file = Dict("file" => file)
71-
72-
# Write something to the file
73-
write(result_file["file"], "Test data")
74-
75-
# Call the function to close the file
76-
check = Logging_module.close_result_file(result_file)
77-
@test check
78-
# Check if the file is closed
79-
is_closed = !isopen(result_file["file"])
80-
81-
# Test if the file is closed
82-
@test is_closed
83-
84-
# Clean up
85-
rm(file_path, force = true)
86-
# Create a sample dictionary with file set to nothing
87-
result_file = Dict("file" => nothing)
88-
89-
# Call the function to close the file
90-
check = Logging_module.close_result_file(result_file)
91-
@test !check
92-
# Test if the file is still nothing
93-
@test isnothing(result_file["file"])
94-
end

0 commit comments

Comments
 (0)