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

ruby-changes:67651

From: Nobuyoshi <ko1@a...>
Date: Tue, 7 Sep 2021 13:03:12 +0900 (JST)
Subject: [ruby-changes:67651] 26153667f9 (master): [ruby/pathname] Prefer omit over skip

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

From 26153667f91f0c883f6af6b61fac2c0df5312b45 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 7 Sep 2021 12:21:49 +0900
Subject: [ruby/pathname] Prefer omit over skip

https://github.com/ruby/pathname/commit/abd0b91044
---
 test/pathname/test_pathname.rb | 18 +++++++++---------
 test/pathname/test_ractor.rb   |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index a83eb1f..9e14668 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -815,7 +815,7 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L815
   end
 
   def test_birthtime
-    skip if RUBY_PLATFORM =~ /android/
+    omit if RUBY_PLATFORM =~ /android/
     # Check under a (probably) local filesystem.
     # Remote filesystems often may not support birthtime.
     with_tmpchdir('rubytest-pathname') do |dir|
@@ -823,9 +823,9 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L823
       assert_kind_of(Time, Pathname("a").birthtime)
     rescue Errno::EPERM
       # Docker prohibits statx syscall by the default.
-      skip("statx(2) is prohibited by seccomp")
+      omit("statx(2) is prohibited by seccomp")
     rescue Errno::ENOSYS
-      skip("statx(2) is not supported on this filesystem")
+      omit("statx(2) is not supported on this filesystem")
     rescue NotImplementedError
       # assert_raise(NotImplementedError) do
       #   File.birthtime("a")
@@ -1120,7 +1120,7 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L1120
   end
 
   def test_grpowned?
-    skip "Unix file owner test" if DOSISH
+    omit "Unix file owner test" if DOSISH
     with_tmpchdir('rubytest-pathname') {|dir|
       open("f", "w") {|f| f.write "abc" }
       File.chown(-1, Process.gid, "f")
@@ -1175,7 +1175,7 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L1175
   end
 
   def test_world_readable?
-    skip "Unix file mode bit test" if DOSISH
+    omit "Unix file mode bit test" if DOSISH
     with_tmpchdir('rubytest-pathname') {|dir|
       open("f", "w") {|f| f.write "abc" }
       File.chmod(0400, "f")
@@ -1227,7 +1227,7 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L1227
   end
 
   def test_sticky?
-    skip "Unix file mode bit test" if DOSISH
+    omit "Unix file mode bit test" if DOSISH
     with_tmpchdir('rubytest-pathname') {|dir|
       open("f", "w") {|f| f.write "abc" }
       assert_equal(false, Pathname("f").sticky?)
@@ -1249,7 +1249,7 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L1249
   end
 
   def test_world_writable?
-    skip "Unix file mode bit test" if DOSISH
+    omit "Unix file mode bit test" if DOSISH
     with_tmpchdir('rubytest-pathname') {|dir|
       open("f", "w") {|f| f.write "abc" }
       File.chmod(0600, "f")
@@ -1409,8 +1409,8 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L1409
         a = []; Pathname("d").find(ignore_error: true) {|v| a << v }; a.sort!
         assert_equal([Pathname("d"), Pathname("d/x")], a)
 
-        skip "no meaning test on Windows" if /mswin|mingw/ =~ RUBY_PLATFORM
-        skip 'skipped in root privilege' if Process.uid == 0
+        omit "no meaning test on Windows" if /mswin|mingw/ =~ RUBY_PLATFORM
+        omit 'skipped in root privilege' if Process.uid == 0
         a = [];
         assert_raise_with_message(Errno::EACCES, %r{d/x}) do
           Pathname(".").find(ignore_error: false) {|v| a << v }
diff --git a/test/pathname/test_ractor.rb b/test/pathname/test_ractor.rb
index 9ce43ef..3d7b63d 100644
--- a/test/pathname/test_ractor.rb
+++ b/test/pathname/test_ractor.rb
@@ -4,7 +4,7 @@ require "pathname" https://github.com/ruby/ruby/blob/trunk/test/pathname/test_ractor.rb#L4
 
 class TestPathnameRactor < Test::Unit::TestCase
   def setup
-    skip unless defined? Ractor
+    omit unless defined? Ractor
   end
 
   def test_ractor_shareable
-- 
cgit v1.1


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

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