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

ruby-changes:59835

From: Koichi <ko1@a...>
Date: Tue, 28 Jan 2020 15:24:39 +0900 (JST)
Subject: [ruby-changes:59835] 9b65bfdc9e (master): support multi-run for test/ruby/test_refinement.rb

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

From 9b65bfdc9e5eb8a36fdd464ed7534ed2a9557ea7 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Tue, 28 Jan 2020 14:35:38 +0900
Subject: support multi-run for test/ruby/test_refinement.rb

Give up to support multi-run:
* test_method_should_use_refinements
* test_instance_method_should_use_refinements

I hope someone can revisit it.

diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index 6fb04de..0db5988 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -217,6 +217,8 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L217
     assert_raise(NoMethodError) { FooExtClient.public_send_b_on(foo) }
   end
 
+  DONE_TESTS = []
+
   module MethodIntegerPowEx
     refine Integer do
       def pow(*)
@@ -225,6 +227,9 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L227
     end
   end
   def test_method_should_use_refinements
+    skip if DONE_TESTS.include? __method__ # giveup multi-run
+    DONE_TESTS << __method__
+
     foo = Foo.new
     assert_raise(NameError) { foo.method(:z) }
     assert_equal("FooExt#z", FooExtClient.method_z(foo).call)
@@ -246,6 +251,9 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L251
     end
   end
   def test_instance_method_should_use_refinements
+    skip if DONE_TESTS.include? __method__ # giveup multi-run
+    DONE_TESTS << __method__
+
     foo = Foo.new
     assert_raise(NameError) { Foo.instance_method(:z) }
     assert_equal("FooExt#z", FooExtClient.instance_method_z(foo).bind(foo).call)
-- 
cgit v0.10.2


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

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