test-unit 3.6.4 → 3.6.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db526a6169793f43216a4519521037141c9243f0d7b39d520d2ddc09d59576da
4
- data.tar.gz: 5351d58e84881dc2faaaf6ad395a2c00b8964ce378a7dfff410d76b83e925b84
3
+ metadata.gz: 238d27a3abf3ab70fa38affa00e2fd5944adde841397d1a5307b68eff94362c2
4
+ data.tar.gz: 6e6ef248d44e47e83bb45d24b160dfdccb32d167123534445d49c7358bcb3bcb
5
5
  SHA512:
6
- metadata.gz: 9f028832fae917599c17ab226de5376c103ad7d6059850fe8af81d1a0b3df77ce9a66d84367e2c61106cb92150883b4031c47119a34a97cd8e3def17f6b84d6b
7
- data.tar.gz: c9a01ad68395703aa58d0b01ac53d0d01c3a25def3a6edc11af6267f37839039a5670f79af74b05182e2eef96bab59cdc9d6612d762e99aff6eacbafc9b64e5c
6
+ metadata.gz: 44cb65959ff5ee6e9673901218b9a29494158a822682d9d12a4b5ba7ce21f965ef87fdf3a697b8d07c91ca7b1fe9f1f0cee7bf6b3da4d74485fd221dcc03fe2c
7
+ data.tar.gz: 327924d71d4ec015870afec579d9936a6e0425dada2c3b6185a10ce9a2f11e9b5666f9b41641fe994e4150a513d4dd659517181ab31158881595502a77cac708
data/Rakefile CHANGED
@@ -65,4 +65,10 @@ end
65
65
 
66
66
  release_task = Rake.application["release"]
67
67
  # We use Trusted Publishing.
68
+ release_task.prerequisites.delete("build")
68
69
  release_task.prerequisites.delete("release:rubygem_push")
70
+ release_task_comment = release_task.comment
71
+ if release_task_comment
72
+ release_task.clear_comments
73
+ release_task.comment = release_task_comment.gsub(/ and build.*$/, "")
74
+ end
data/doc/text/news.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # News
2
2
 
3
+ ## 3.6.7 - 2024-12-17 {#version-3-6-7}
4
+
5
+ ### Fixes
6
+
7
+ * Fixed a bug that test-unit doesn't work with Ruby < 2.5.
8
+
9
+ ## 3.6.6 - 2024-12-17 {#version-3-6-6}
10
+
11
+ ### Improvements
12
+
13
+ * Improved backward compatibility for the `Test::Unit::TestCase#run`
14
+ overriding case. In general, we don't recommend it but there are
15
+ old scripts that do it. (Mainly, I did it...)
16
+ * GH-276
17
+ * Reported by Mamoru TASAKA
18
+
19
+ ### Thanks
20
+
21
+ * Mamoru TASAKA
22
+
23
+ ## 3.6.5 - 2024-12-15 {#version-3-6-5}
24
+
25
+ ### Fixes
26
+
27
+ * parallel: thread: Fixed a bug that we can't use `pend` and `notify`.
28
+ * GH-271
29
+ * Reported by Takahiro Ueda
30
+ * Patch by Tsutomu Katsube
31
+
32
+ ### Thanks
33
+
34
+ * Takahiro Ueda
35
+
36
+ * Tsutomu Katsube
37
+
3
38
  ## 3.6.4 - 2024-11-28 {#version-3-6-4}
4
39
 
5
40
  ### Improvements
@@ -35,10 +35,18 @@ module Test
35
35
  @parent_test_result.add_failure(failure)
36
36
  end
37
37
 
38
+ def add_pending(pending)
39
+ @parent_test_result.add_pending(pending)
40
+ end
41
+
38
42
  def add_omission(omission)
39
43
  @parent_test_result.add_omission(omission)
40
44
  end
41
45
 
46
+ def add_notification(notification)
47
+ @parent_test_result.add_notification(notification)
48
+ end
49
+
42
50
  def passed?
43
51
  @parent_test_result.passed?
44
52
  end
@@ -65,7 +65,7 @@ module Test
65
65
  finished_is_yielded = false
66
66
  finished_object_is_yielded = false
67
67
  previous_event_name = nil
68
- test.run(result, runner: self.class) do |event_name, *args|
68
+ event_listener = lambda do |event_name, *args|
69
69
  case previous_event_name
70
70
  when Test::Unit::TestCase::STARTED
71
71
  if event_name != Test::Unit::TestCase::STARTED_OBJECT
@@ -90,6 +90,14 @@ module Test
90
90
  yield(event_name, *args)
91
91
  end
92
92
 
93
+ if test.method(:run).arity == -2
94
+ test.run(result, runner_class: self.class, &event_listener)
95
+ else
96
+ # For backward compatibility. There are scripts that overrides
97
+ # Test::Unit::TestCase#run without keyword arguments.
98
+ test.run(result, &event_listener)
99
+ end
100
+
93
101
  if finished_is_yielded and not finished_object_is_yielded
94
102
  yield(Test::Unit::TestCase::FINISHED_OBJECT, test)
95
103
  end
@@ -17,12 +17,12 @@ module Test
17
17
  end
18
18
 
19
19
  def run_all_tests
20
- n_consumers = TestSuiteRunner.n_workers
20
+ n_workers = TestSuiteRunner.n_workers
21
21
 
22
- consumers = []
22
+ workers = []
23
23
  sub_exceptions = []
24
- n_consumers.times do |i|
25
- consumers << Thread.new(i) do |worker_id|
24
+ n_workers.times do |i|
25
+ workers << Thread.new(i) do |worker_id|
26
26
  begin
27
27
  loop do
28
28
  task = @task_queue.pop
@@ -39,10 +39,10 @@ module Test
39
39
 
40
40
  yield
41
41
 
42
- n_consumers.times do
42
+ n_workers.times do
43
43
  @task_queue << nil
44
44
  end
45
- consumers.each(&:join)
45
+ workers.each(&:join)
46
46
  sub_exceptions.each do |exception|
47
47
  raise exception
48
48
  end
@@ -577,7 +577,7 @@ module Test
577
577
  # Runs the individual test method represented by this
578
578
  # instance of the fixture, collecting statistics, failures
579
579
  # and errors in result.
580
- def run(result, runner: nil)
580
+ def run(result, runner_class: nil)
581
581
  begin
582
582
  @_result = result
583
583
  @internal_data.test_started
@@ -47,9 +47,9 @@ module Test
47
47
 
48
48
  # Runs the tests and/or suites contained in this
49
49
  # TestSuite.
50
- def run(result, runner: nil, &progress_block)
51
- runner ||= TestSuiteRunner
52
- runner.new(self).run(result) do |event, *args|
50
+ def run(result, runner_class: nil, &progress_block)
51
+ runner_class ||= TestSuiteRunner
52
+ runner_class.new(self).run(result) do |event, *args|
53
53
  case event
54
54
  when STARTED
55
55
  @start_time = Time.now
@@ -69,7 +69,7 @@ module Test
69
69
  if result.nil?
70
70
  run
71
71
  else
72
- @suite.run(result, runner: @test_suite_runner_class) do |channel, value|
72
+ @suite.run(result, runner_class: @test_suite_runner_class) do |channel, value|
73
73
  notify_listeners(channel, value)
74
74
  end
75
75
  end
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = "3.6.4"
3
+ VERSION = "3.6.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.4
4
+ version: 3.6.7
5
5
  platform: ruby
6
- original_platform: ''
7
6
  authors:
8
7
  - Kouhei Sutou
9
8
  - Haruka Yoshihara
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-11-28 00:00:00.000000000 Z
12
+ date: 2024-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: power_assert
@@ -113,6 +113,7 @@ metadata:
113
113
  source_code_uri: https://github.com/test-unit/test-unit
114
114
  documentation_uri: https://test-unit.github.io/test-unit/en/
115
115
  bug_tracker_uri: https://github.com/test-unit/test-unit/issues
116
+ post_install_message:
116
117
  rdoc_options: []
117
118
  require_paths:
118
119
  - lib
@@ -127,7 +128,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
128
  - !ruby/object:Gem::Version
128
129
  version: '0'
129
130
  requirements: []
130
- rubygems_version: 3.6.0.dev
131
+ rubygems_version: 3.5.22
132
+ signing_key:
131
133
  specification_version: 4
132
134
  summary: An xUnit family unit testing framework for Ruby.
133
135
  test_files: []