test-unit 3.6.1 → 3.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +15 -0
- data/lib/test/unit/autorunner.rb +25 -0
- data/lib/test/unit/fault-location-detector.rb +1 -1
- data/lib/test/unit/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f41e0d3b7f646e1dd57ac1feb94dd9d91e9a3a6b79e7391371319733e0cd627
|
4
|
+
data.tar.gz: 6ea673fe38e82189ab39c3bd24d90b1e862b29cfecd71d260ae82b7995d80e3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53689a9a862aae643553b81f7475b9efb19cf4cabb4f23f020833849d211d1ee36a5c5f8c8b0a1c4ea3ad53cb086b3aab73b031f19b329353a83840d9853793b
|
7
|
+
data.tar.gz: 239c343b398180bd337ef19b47815abe347e93ef0972af56534edd6763763603e1e7975135876e61ba042195b2247fa153f4fe2bc61383fabbac11f256c44a6b
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 3.6.2 - 2024-02-16 {#version-3-6-2}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* UI: console: Add `--gc-stress` option that enables `GC.stress`
|
8
|
+
only whie each test is running.
|
9
|
+
|
10
|
+
* Added support for Ruby 3.4 style backtrace.
|
11
|
+
[GH-237][https://github.com/test-unit/test-unit/issues/237]
|
12
|
+
[Patch by Yusuke Endoh]
|
13
|
+
|
14
|
+
### Thanks
|
15
|
+
|
16
|
+
* Yusuke Endoh
|
17
|
+
|
3
18
|
## 3.6.1 - 2023-06-25 {#version-3-6-1}
|
4
19
|
|
5
20
|
### Improvements
|
data/lib/test/unit/autorunner.rb
CHANGED
@@ -145,6 +145,7 @@ module Test
|
|
145
145
|
attr_accessor :color_scheme, :listeners
|
146
146
|
attr_writer :stop_on_failure
|
147
147
|
attr_writer :debug_on_failure
|
148
|
+
attr_writer :gc_stress
|
148
149
|
attr_writer :runner, :collector
|
149
150
|
|
150
151
|
def initialize(standalone)
|
@@ -161,6 +162,7 @@ module Test
|
|
161
162
|
@listeners = []
|
162
163
|
@stop_on_failure = false
|
163
164
|
@debug_on_failure = false
|
165
|
+
@gc_stress = false
|
164
166
|
config_file = "test-unit.yml"
|
165
167
|
if File.exist?(config_file)
|
166
168
|
load_config(config_file)
|
@@ -393,6 +395,12 @@ module Test
|
|
393
395
|
AssertionFailedError.debug_on_failure = boolean
|
394
396
|
end
|
395
397
|
|
398
|
+
o.on("--[no-]gc-stress",
|
399
|
+
"Enable GC.stress only while each test is running",
|
400
|
+
"(#{@gc_stress})") do |boolean|
|
401
|
+
@gc_stress = boolean
|
402
|
+
end
|
403
|
+
|
396
404
|
ADDITIONAL_OPTIONS.each do |option_builder|
|
397
405
|
option_builder.call(self, o)
|
398
406
|
end
|
@@ -454,6 +462,9 @@ module Test
|
|
454
462
|
if @stop_on_failure
|
455
463
|
@runner_options[:listeners] << StopOnFailureListener.new
|
456
464
|
end
|
465
|
+
if @gc_stress
|
466
|
+
@runner_options[:listeners] << GCStressListener.new
|
467
|
+
end
|
457
468
|
change_work_directory do
|
458
469
|
runner.run(suite, @runner_options).passed?
|
459
470
|
end
|
@@ -572,6 +583,20 @@ module Test
|
|
572
583
|
end
|
573
584
|
end
|
574
585
|
end
|
586
|
+
|
587
|
+
class GCStressListener
|
588
|
+
def attach_to_mediator(mediator)
|
589
|
+
mediator.add_listener(TestCase::STARTED) do |test|
|
590
|
+
GC.start
|
591
|
+
GC.stress = true
|
592
|
+
end
|
593
|
+
|
594
|
+
mediator.add_listener(TestCase::FINISHED) do |test|
|
595
|
+
GC.start
|
596
|
+
GC.stress = false
|
597
|
+
end
|
598
|
+
end
|
599
|
+
end
|
575
600
|
end
|
576
601
|
end
|
577
602
|
end
|
@@ -18,7 +18,7 @@ module Test
|
|
18
18
|
return nil if match_data.nil?
|
19
19
|
file, line_number, context = match_data.to_a[1..-1]
|
20
20
|
line_number = line_number.to_i
|
21
|
-
if /\Ain `(.+?)'/ =~ context
|
21
|
+
if /\Ain [`'](.+?)'/ =~ context
|
22
22
|
method_name = $1
|
23
23
|
if /\Ablock (?:\(.+?\) )?in / =~ method_name
|
24
24
|
method_name = $POSTMATCH
|
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.6.
|
4
|
+
version: 3.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: power_assert
|
@@ -171,7 +171,7 @@ files:
|
|
171
171
|
- sample/test_adder.rb
|
172
172
|
- sample/test_subtracter.rb
|
173
173
|
- sample/test_user.rb
|
174
|
-
homepage:
|
174
|
+
homepage: https://test-unit.github.io/
|
175
175
|
licenses:
|
176
176
|
- Ruby
|
177
177
|
- BSDL
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.5.
|
198
|
+
rubygems_version: 3.5.1
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: An xUnit family unit testing framework for Ruby.
|