File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff 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")
6464end
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
You can’t perform that action at this time.
0 commit comments