зеркало из https://github.com/github/ruby.git
test_files.rb: sample size
* test/ripper/test_files.rb (assert_parse_files): extract at least one sample. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5564a498e1
Коммит
25aeeca5b7
|
@ -35,7 +35,9 @@ class TestRipper::Generic < Test::Unit::TestCase
|
|||
end
|
||||
dir = ARGV.shift
|
||||
scripts = Dir.chdir(dir) {Dir[pattern]}
|
||||
scripts = scripts.sample(scripts.size * TEST_RATIO) if TEST_RATIO < 1.0
|
||||
if (1...scripts.size).include?(num = scripts.size * TEST_RATIO)
|
||||
scripts = scripts.sample(num)
|
||||
end
|
||||
scripts.sort!
|
||||
for script in scripts
|
||||
assert_nothing_raised {
|
||||
|
|
Загрузка…
Ссылка в новой задаче