test-unit 3.7.7 → 3.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/text/news.md +23 -0
- data/lib/test/unit/autorunner.rb +5 -6
- data/lib/test/unit/fixture.rb +2 -2
- data/lib/test/unit/process-worker.rb +5 -1
- data/lib/test/unit/test-suite-process-runner.rb +10 -2
- data/lib/test/unit/test-suite-runner.rb +4 -4
- data/lib/test/unit/testcase.rb +6 -6
- data/lib/test/unit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d64076158041a312c58ce977afe5c0f745c1a2a0d711625a6f6bf21932c98f4
|
|
4
|
+
data.tar.gz: 743e029096fe4daa2dbfca477b2618d0880b53b88f66693cf899f6983407a6e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 401854bb5a7a94f67fb37840a9a62e02f7c55f8f62b2eacdf93d1ea0bbd139228fadd1260356d4adf85f40ee94cbcbd353800e1e4478ab7da1529410b9181f62
|
|
7
|
+
data.tar.gz: 61e9f5156e3d15bc0e52b517e8254f6aaba755df98d67a5f5abbdaef371300bcbcefaff9379cf98120e9be50a2f702e1ebe58f5cb05b6eef4e15831209813f77
|
data/doc/text/news.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# News
|
|
2
2
|
|
|
3
|
+
## 3.7.8 - 2026-06-05 {#version-3-7-8}
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
* parallel: process: Improved performance on Windows.
|
|
8
|
+
* GH-368
|
|
9
|
+
|
|
10
|
+
* Improved compatibility with Ruby::Box on `$!`.
|
|
11
|
+
* GH-370
|
|
12
|
+
* Patch by MATSUMOTO Katsuyoshi
|
|
13
|
+
|
|
14
|
+
* doc: Added a process option in parallel options.
|
|
15
|
+
* GH-373
|
|
16
|
+
|
|
17
|
+
* Improved the `-I` option. You can prepend load paths to prioritize
|
|
18
|
+
your development library over the system library.
|
|
19
|
+
* ruby/rubygems#9572
|
|
20
|
+
* GH-375
|
|
21
|
+
|
|
22
|
+
### Thanks
|
|
23
|
+
|
|
24
|
+
* MATSUMOTO Katsuyoshi
|
|
25
|
+
|
|
3
26
|
## 3.7.7 - 2026-01-01 {#version-3-7-7}
|
|
4
27
|
|
|
5
28
|
### Fixes
|
data/lib/test/unit/autorunner.rb
CHANGED
|
@@ -199,6 +199,7 @@ module Test
|
|
|
199
199
|
begin
|
|
200
200
|
args.unshift(*@default_arguments)
|
|
201
201
|
options.order!(args) {|arg| add_test_path(arg)}
|
|
202
|
+
$LOAD_PATH.unshift(*@load_paths)
|
|
202
203
|
rescue OptionParser::ParseError => e
|
|
203
204
|
puts e
|
|
204
205
|
puts options
|
|
@@ -363,10 +364,8 @@ module Test
|
|
|
363
364
|
end
|
|
364
365
|
|
|
365
366
|
o.on("-I", "--load-path=DIR[#{File::PATH_SEPARATOR}DIR...]",
|
|
366
|
-
"
|
|
367
|
-
load_paths
|
|
368
|
-
$LOAD_PATH.concat(load_paths)
|
|
369
|
-
@load_paths.concat(load_paths)
|
|
367
|
+
"Prepends directory list to $LOAD_PATH.") do |dirs|
|
|
368
|
+
@load_paths.concat(dirs.split(File::PATH_SEPARATOR))
|
|
370
369
|
end
|
|
371
370
|
|
|
372
371
|
color_schemes = ColorScheme.all
|
|
@@ -418,8 +417,8 @@ module Test
|
|
|
418
417
|
:thread,
|
|
419
418
|
:process,
|
|
420
419
|
]
|
|
421
|
-
o.on("--[no-]parallel=[
|
|
422
|
-
"Runs tests in parallel",
|
|
420
|
+
o.on("--[no-]parallel=[PARALLEL]", parallel_options,
|
|
421
|
+
"Runs tests in parallel: #{parallel_options.join(", ")}",
|
|
423
422
|
"(#{parallel_options.first})") do |parallel|
|
|
424
423
|
case parallel
|
|
425
424
|
when nil, :thread
|
data/lib/test/unit/fixture.rb
CHANGED
|
@@ -282,9 +282,9 @@ module Test
|
|
|
282
282
|
return unless respond_to?(method_name, true)
|
|
283
283
|
begin
|
|
284
284
|
__send__(method_name, &block)
|
|
285
|
-
rescue Exception
|
|
285
|
+
rescue Exception => e
|
|
286
286
|
raise unless options[:handle_exception]
|
|
287
|
-
raise unless handle_exception(
|
|
287
|
+
raise unless handle_exception(e)
|
|
288
288
|
end
|
|
289
289
|
end
|
|
290
290
|
|
|
@@ -8,8 +8,9 @@ require "optparse"
|
|
|
8
8
|
require "socket"
|
|
9
9
|
|
|
10
10
|
parser = OptionParser.new
|
|
11
|
+
load_paths = []
|
|
11
12
|
parser.on("--load-path=PATH") do |path|
|
|
12
|
-
|
|
13
|
+
load_paths << path
|
|
13
14
|
end
|
|
14
15
|
base_directory = nil
|
|
15
16
|
parser.on("--base-directory=PATH") do |path|
|
|
@@ -28,6 +29,7 @@ parser.on("--ip-port=PORT", Integer) do |port|
|
|
|
28
29
|
remote_ip_port = port
|
|
29
30
|
end
|
|
30
31
|
test_paths = parser.parse!
|
|
32
|
+
$LOAD_PATH.unshift(*load_paths)
|
|
31
33
|
|
|
32
34
|
require_relative "../unit"
|
|
33
35
|
require_relative "collector/load"
|
|
@@ -41,6 +43,8 @@ suite = collector.collect(*test_paths)
|
|
|
41
43
|
io_open = lambda do |&block|
|
|
42
44
|
if Gem.win_platform?
|
|
43
45
|
TCPSocket.open(remote_ip_address, remote_ip_port) do |data_socket|
|
|
46
|
+
Marshal.dump(Process.pid, data_socket)
|
|
47
|
+
data_socket.flush
|
|
44
48
|
block.call(data_socket, data_socket)
|
|
45
49
|
end
|
|
46
50
|
else
|
|
@@ -77,8 +77,9 @@ module Test
|
|
|
77
77
|
# On Windows, file descriptors 3 and above cannot be passed to
|
|
78
78
|
# child processes.
|
|
79
79
|
pid = spawn(*command_line)
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
# They are replaced later. This is just for ensuring calling
|
|
81
|
+
# `Process.waitpid(pid)` on error.
|
|
82
|
+
workers << Worker.new(pid, nil, nil)
|
|
82
83
|
else
|
|
83
84
|
main_to_worker_input, main_to_worker_output = IO.pipe
|
|
84
85
|
worker_to_main_input, worker_to_main_output = IO.pipe
|
|
@@ -89,6 +90,13 @@ module Test
|
|
|
89
90
|
workers << Worker.new(pid, main_to_worker_output, worker_to_main_input)
|
|
90
91
|
end
|
|
91
92
|
end
|
|
93
|
+
if Gem.win_platform?
|
|
94
|
+
workers = workers.collect do
|
|
95
|
+
data_socket = tcp_server.accept
|
|
96
|
+
pid = Marshal.load(data_socket)
|
|
97
|
+
Worker.new(pid, data_socket, data_socket)
|
|
98
|
+
end
|
|
99
|
+
end
|
|
92
100
|
|
|
93
101
|
run_context = TestProcessRunContext.new(self)
|
|
94
102
|
yield(run_context)
|
|
@@ -53,8 +53,8 @@ module Test
|
|
|
53
53
|
test_case.worker_id = worker_context.id
|
|
54
54
|
begin
|
|
55
55
|
test_case.startup
|
|
56
|
-
rescue Exception
|
|
57
|
-
raise unless handle_exception(
|
|
56
|
+
rescue Exception => e
|
|
57
|
+
raise unless handle_exception(e, worker_context.result)
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
@@ -112,8 +112,8 @@ module Test
|
|
|
112
112
|
test_case.worker_id = worker_context.id
|
|
113
113
|
begin
|
|
114
114
|
test_case.shutdown
|
|
115
|
-
rescue Exception
|
|
116
|
-
raise unless handle_exception(
|
|
115
|
+
rescue Exception => e
|
|
116
|
+
raise unless handle_exception(e, worker_context.result)
|
|
117
117
|
end
|
|
118
118
|
end
|
|
119
119
|
|
data/lib/test/unit/testcase.rb
CHANGED
|
@@ -634,9 +634,9 @@ module Test
|
|
|
634
634
|
run_test
|
|
635
635
|
run_cleanup
|
|
636
636
|
add_pass
|
|
637
|
-
rescue Exception
|
|
637
|
+
rescue Exception => e
|
|
638
638
|
@internal_data.interrupted
|
|
639
|
-
unless handle_exception(
|
|
639
|
+
unless handle_exception(e)
|
|
640
640
|
processed_exception_in_setup = true
|
|
641
641
|
raise
|
|
642
642
|
end
|
|
@@ -644,18 +644,18 @@ module Test
|
|
|
644
644
|
end
|
|
645
645
|
end
|
|
646
646
|
end
|
|
647
|
-
rescue Exception
|
|
647
|
+
rescue Exception => e
|
|
648
648
|
if processed_exception_in_setup
|
|
649
649
|
raise
|
|
650
650
|
else
|
|
651
651
|
@internal_data.interrupted
|
|
652
|
-
raise unless handle_exception(
|
|
652
|
+
raise unless handle_exception(e)
|
|
653
653
|
end
|
|
654
654
|
ensure
|
|
655
655
|
begin
|
|
656
656
|
run_teardown
|
|
657
|
-
rescue Exception
|
|
658
|
-
raise unless handle_exception(
|
|
657
|
+
rescue Exception => e
|
|
658
|
+
raise unless handle_exception(e)
|
|
659
659
|
end
|
|
660
660
|
end
|
|
661
661
|
@internal_data.test_finished
|
data/lib/test/unit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: test-unit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.7.
|
|
4
|
+
version: 3.7.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kouhei Sutou
|
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
135
135
|
- !ruby/object:Gem::Version
|
|
136
136
|
version: '0'
|
|
137
137
|
requirements: []
|
|
138
|
-
rubygems_version: 4.0.
|
|
138
|
+
rubygems_version: 4.0.10
|
|
139
139
|
specification_version: 4
|
|
140
140
|
summary: An xUnit family unit testing framework for Ruby.
|
|
141
141
|
test_files: []
|