test-unit 3.6.4 → 3.6.6

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: fb180f2c9377ae51f23460d2189f4c20217bfeca25a8ae1fff695f739be548bb
4
+ data.tar.gz: 9057f25cf319ffd6ef9185a9f0a80f83975bf3f8a1738bc636e3dd829f9ba4d3
5
5
  SHA512:
6
- metadata.gz: 9f028832fae917599c17ab226de5376c103ad7d6059850fe8af81d1a0b3df77ce9a66d84367e2c61106cb92150883b4031c47119a34a97cd8e3def17f6b84d6b
7
- data.tar.gz: c9a01ad68395703aa58d0b01ac53d0d01c3a25def3a6edc11af6267f37839039a5670f79af74b05182e2eef96bab59cdc9d6612d762e99aff6eacbafc9b64e5c
6
+ metadata.gz: 3a2dc1551d424ea48056738d7342627c94b1b868a69c01153bed8d3c57cf0f78674a86812e39e00fead22f1035e6ccf383cadb4e91eabe7fb849b8f919bcd1b3
7
+ data.tar.gz: 221694d5d44ee5bc4f4ab4faaf8739ee0d3e677e2b337ae98d1fe8443c92c5e0d0dc478a1974ffdbdbffed7217c25b51efae6caaa28fc6e107112732239a96fa
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,34 @@
1
1
  # News
2
2
 
3
+ ## 3.6.6 - 2024-12-17 {#version-3-6-6}
4
+
5
+ ### Improvements
6
+
7
+ * Improved backward compatibility for the `Test::Unit::TestCase#run`
8
+ overriding case. In general, we don't recommend it but there are
9
+ old scripts that do it. (Mainly, I did it...)
10
+ * GH-276
11
+ * Reported by Mamoru TASAKA
12
+
13
+ ### Thanks
14
+
15
+ * Mamoru TASAKA
16
+
17
+ ## 3.6.5 - 2024-12-15 {#version-3-6-5}
18
+
19
+ ### Fixes
20
+
21
+ * parallel: thread: Fixed a bug that we can't use `pend` and `notify`.
22
+ * GH-271
23
+ * Reported by Takahiro Ueda
24
+ * Patch by Tsutomu Katsube
25
+
26
+ ### Thanks
27
+
28
+ * Takahiro Ueda
29
+
30
+ * Tsutomu Katsube
31
+
3
32
  ## 3.6.4 - 2024-11-28 {#version-3-6-4}
4
33
 
5
34
  ### 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,11 @@ 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
+ options = {}
69
+ # For backward compatibility. There are scripts that overrides
70
+ # Test::Unit::TestCase#run without keyword arguments.
71
+ options[:runner_class] = self.class if test.method(:run).arity == -2
72
+ test.run(result, **options) do |event_name, *args|
69
73
  case previous_event_name
70
74
  when Test::Unit::TestCase::STARTED
71
75
  if event_name != Test::Unit::TestCase::STARTED_OBJECT
@@ -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.6"
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.6
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: []