[前][次][番号順一覧][スレッド一覧]

ruby-changes:70819

From: Hiroshi <ko1@a...>
Date: Tue, 11 Jan 2022 21:18:23 +0900 (JST)
Subject: [ruby-changes:70819] f95039af75 (master): Use omit instead of skip without the default gems tests

https://git.ruby-lang.org/ruby.git/commit/?id=f95039af75

From f95039af7584a2fa27e4d1cbcdf28bbf5b5ecdcf Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Tue, 11 Jan 2022 21:17:53 +0900
Subject: Use omit instead of skip without the default gems tests

---
 test/dtrace/helper.rb         |  2 +-
 test/fiber/test_enumerator.rb |  4 ++--
 test/fiber/test_io.rb         | 12 ++++++------
 test/fiber/test_io_buffer.rb  |  8 ++++----
 test/fiber/test_ractor.rb     |  2 +-
 test/ruby/test_gc.rb          |  4 ++--
 test/test_pty.rb              | 30 +++++++++++++++---------------
 7 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb
index ce730800b47..7fa16965f12 100644
--- a/test/dtrace/helper.rb
+++ b/test/dtrace/helper.rb
@@ -122,7 +122,7 @@ module DTrace https://github.com/ruby/ruby/blob/trunk/test/dtrace/helper.rb#L122
     def trap_probe d_program, ruby_program
       if Hash === d_program
         d_program = d_program[IMPL] or
-          skip "#{d_program} not implemented for #{IMPL}"
+          omit "#{d_program} not implemented for #{IMPL}"
       elsif String === d_program && IMPL == :stap
         d_program = dtrace2systemtap(d_program)
       end
diff --git a/test/fiber/test_enumerator.rb b/test/fiber/test_enumerator.rb
index cd4ccd1de54..c635f474dbd 100644
--- a/test/fiber/test_enumerator.rb
+++ b/test/fiber/test_enumerator.rb
@@ -6,14 +6,14 @@ class TestFiberEnumerator < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_enumerator.rb#L6
   MESSAGE = "Hello World"
 
   def test_read_characters
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
 
     unless i.nonblock? && o.nonblock?
       i.close
       o.close
-      skip "I/O is not non-blocking!"
+      omit "I/O is not non-blocking!"
     end
 
     message = String.new
diff --git a/test/fiber/test_io.rb b/test/fiber/test_io.rb
index 06a3c0dd110..4252641cde1 100644
--- a/test/fiber/test_io.rb
+++ b/test/fiber/test_io.rb
@@ -6,14 +6,14 @@ class TestFiberIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io.rb#L6
   MESSAGE = "Hello World"
 
   def test_read
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
 
     unless i.nonblock? && o.nonblock?
       i.close
       o.close
-      skip "I/O is not non-blocking!"
+      omit "I/O is not non-blocking!"
     end
 
     message = nil
@@ -41,7 +41,7 @@ class TestFiberIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io.rb#L41
   end
 
   def test_heavy_read
-    skip unless defined?(UNIXSocket)
+    omit unless defined?(UNIXSocket)
 
     16.times.map do
       Thread.new do
@@ -64,14 +64,14 @@ class TestFiberIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io.rb#L64
   end
 
   def test_epipe_on_read
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
 
     unless i.nonblock? && o.nonblock?
       i.close
       o.close
-      skip "I/O is not non-blocking!"
+      omit "I/O is not non-blocking!"
     end
 
     error = nil
@@ -142,7 +142,7 @@ class TestFiberIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io.rb#L142
   end
 
   def test_read_write_blocking
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
     i.nonblock = false
diff --git a/test/fiber/test_io_buffer.rb b/test/fiber/test_io_buffer.rb
index 5b34a37331b..48a34c31b61 100644
--- a/test/fiber/test_io_buffer.rb
+++ b/test/fiber/test_io_buffer.rb
@@ -8,7 +8,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io_buffer.rb#L8
   MESSAGE = "Hello World"
 
   def test_read_write_blocking
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
     i.nonblock = false
@@ -42,7 +42,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io_buffer.rb#L42
   end
 
   def test_timeout_after
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
     i.nonblock = false
@@ -76,7 +76,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io_buffer.rb#L76
   end
 
   def test_read_nonblock
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
 
@@ -101,7 +101,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io_buffer.rb#L101
   end
 
   def test_write_nonblock
-    skip "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+    omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
 
     i, o = UNIXSocket.pair
 
diff --git a/test/fiber/test_ractor.rb b/test/fiber/test_ractor.rb
index d03455a9f76..3c4ccbd8e5f 100644
--- a/test/fiber/test_ractor.rb
+++ b/test/fiber/test_ractor.rb
@@ -4,7 +4,7 @@ require "fiber" https://github.com/ruby/ruby/blob/trunk/test/fiber/test_ractor.rb#L4
 
 class TestFiberCurrentRactor < Test::Unit::TestCase
   def setup
-    skip unless defined? Ractor
+    omit unless defined? Ractor
   end
 
   def test_ractor_shareable
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 2e91b5eb2d5..788f2974b58 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -140,7 +140,7 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L140
   end
 
   def test_stat_heap
-    skip 'stress' if GC.stress
+    omit 'stress' if GC.stress
 
     stat_heap = {}
     stat = {}
@@ -187,7 +187,7 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L187
   end
 
   def test_stat_heap_constraints
-    skip 'stress' if GC.stress
+    omit 'stress' if GC.stress
 
     stat = GC.stat
     stat_heap = GC.stat_heap
diff --git a/test/test_pty.rb b/test/test_pty.rb
index 9e40a3d2fb0..1c0c6fb3e87 100644
--- a/test/test_pty.rb
+++ b/test/test_pty.rb
@@ -14,7 +14,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L14
   def test_spawn_without_block
     r, w, pid = PTY.spawn(RUBY, '-e', 'puts "a"')
   rescue RuntimeError
-    skip $!
+    omit $!
   else
     assert_equal("a\r\n", r.gets)
   ensure
@@ -34,7 +34,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L34
       end
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   end
 
   def test_commandline
@@ -49,7 +49,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L49
       end
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   end
 
   def test_argv0
@@ -63,13 +63,13 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L63
       end
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   end
 
   def test_open_without_block
     ret = PTY.open
   rescue RuntimeError
-    skip $!
+    omit $!
   else
     assert_kind_of(Array, ret)
     assert_equal(2, ret.length)
@@ -100,7 +100,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L100
       x
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   else
     assert(r[0].closed?)
     assert(r[1].closed?)
@@ -115,7 +115,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L115
       assert(master.closed?)
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   else
     assert_nothing_raised {
       PTY.open {|master, slave|
@@ -133,7 +133,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L133
       assert_equal("bar", slave.gets.chomp)
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   end
 
   def test_stat_slave
@@ -143,7 +143,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L143
       assert_equal(0600, s.mode & 0777)
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   end
 
   def test_close_master
@@ -152,7 +152,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L152
       assert_raise(EOFError) { slave.readpartial(10) }
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   end
 
   def test_close_slave
@@ -165,7 +165,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L165
       ) { master.readpartial(10) }
     }
   rescue RuntimeError
-    skip $!
+    omit $!
   end
 
   def test_getpty_nonexistent
@@ -175,7 +175,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L175
         begin
           PTY.getpty(File.join(tmpdir, "no-such-command"))
         rescue RuntimeError
-          skip $!
+          omit $!
         end
       }
     end
@@ -194,7 +194,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L194
       end until st2 = PTY.check(pid)
     end
   rescue RuntimeError
-    skip $!
+    omit $!
   else
     assert_nil(st1)
     assert_equal(pid, st2.pid)
@@ -212,7 +212,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L212
       st2 = assert_raise(PTY::ChildExited, bug2642) {PTY.check(pid, true)}.status
     e (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]