* test/lib/minitest/unit.rb: Less ObjectSpace.each_object(Tempfile)
invocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70c15b19fa
commit
540ffb3abd
@ -1,3 +1,8 @@
|
|||||||
|
Sun May 25 17:09:13 2014 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* test/lib/minitest/unit.rb: Less ObjectSpace.each_object(Tempfile)
|
||||||
|
invocation.
|
||||||
|
|
||||||
Sun May 25 16:54:06 2014 Tanaka Akira <akr@fsij.org>
|
Sun May 25 16:54:06 2014 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* test/lib/minitest/unit.rb: Use Thread.list instead of
|
* test/lib/minitest/unit.rb: Use Thread.list instead of
|
||||||
|
@ -923,12 +923,12 @@ module MiniTest
|
|||||||
filter === m || filter === "#{suite}##{m}"
|
filter === m || filter === "#{suite}##{m}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
live1 = live_thread_and_tempfile
|
||||||
|
|
||||||
assertions = filtered_test_methods.map { |method|
|
assertions = filtered_test_methods.map { |method|
|
||||||
inst = suite.new method
|
inst = suite.new method
|
||||||
inst._assertions = 0
|
inst._assertions = 0
|
||||||
|
|
||||||
live1 = live_thread_and_tempfile
|
|
||||||
|
|
||||||
print "#{suite}##{method} = " if @verbose
|
print "#{suite}##{method} = " if @verbose
|
||||||
|
|
||||||
start_time = Time.now if @verbose
|
start_time = Time.now if @verbose
|
||||||
@ -938,7 +938,9 @@ module MiniTest
|
|||||||
print result
|
print result
|
||||||
puts if @verbose
|
puts if @verbose
|
||||||
|
|
||||||
check_tempfile_and_thread inst, live1
|
live2 = live_thread_and_tempfile
|
||||||
|
check_tempfile_and_thread inst, live1, live2
|
||||||
|
live1 = live2
|
||||||
|
|
||||||
inst._assertions
|
inst._assertions
|
||||||
}
|
}
|
||||||
@ -960,8 +962,7 @@ module MiniTest
|
|||||||
[live_threads, live_tempfiles]
|
[live_threads, live_tempfiles]
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_tempfile_and_thread(inst, live1)
|
def check_tempfile_and_thread(inst, live1, live2)
|
||||||
live2 = live_thread_and_tempfile
|
|
||||||
thread_finished = live1[0] - live2[0]
|
thread_finished = live1[0] - live2[0]
|
||||||
if !thread_finished.empty?
|
if !thread_finished.empty?
|
||||||
list = thread_finished.map {|t| ' ' + t.inspect }.sort.join
|
list = thread_finished.map {|t| ' ' + t.inspect }.sort.join
|
||||||
|
Loading…
x
Reference in New Issue
Block a user