Hello community, here is the log from the commit of package rubygem-test-unit for openSUSE:Factory checked in at 2016-08-26 23:16:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-test-unit (Old) and /work/SRC/openSUSE:Factory/.rubygem-test-unit.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-test-unit" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-test-unit/rubygem-test-unit.changes 2016-06-14 23:08:04.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-test-unit.new/rubygem-test-unit.changes 2016-08-26 23:16:30.000000000 +0200 @@ -1,0 +2,24 @@ +Wed Jul 20 04:33:20 UTC 2016 - co...@suse.com + +- updated to version 3.2.1 + see installed news.md + + ## 3.2.1 - 2016-07-19 {#version-3-2-1} + + ### Improvements + + * Clarified lib/test/unit/diff.rb license. It's a triple license of + the Ruby license, PSF license and LGPLv2.1 or later. + [Reported by Luisa Pace] + + * Reported norification when data driven test doesn't have + parameter. + [GitHub#122][Reported by Satoshi "Moris" Tagomori] + + ### Thanks + + * Luisa Pace + + * Satoshi "Moris" Tagomori + +------------------------------------------------------------------- Old: ---- test-unit-3.2.0.gem New: ---- test-unit-3.2.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-test-unit.spec ++++++ --- /var/tmp/diff_new_pack.UnZI9t/_old 2016-08-26 23:16:31.000000000 +0200 +++ /var/tmp/diff_new_pack.UnZI9t/_new 2016-08-26 23:16:31.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-test-unit -Version: 3.2.0 +Version: 3.2.1 Release: 0 %define mod_name test-unit %define mod_full_name %{mod_name}-%{version} ++++++ test-unit-3.2.0.gem -> test-unit-3.2.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/COPYING new/COPYING --- old/COPYING 2016-06-12 04:33:11.000000000 +0200 +++ new/COPYING 2016-07-19 11:33:53.000000000 +0200 @@ -61,4 +61,7 @@ Exceptions ---------- - * lib/test/unit/diff.rb: PSFL + * lib/test/unit/diff.rb: This license, PSF license and/or LGPLv2.1 + or later + + * lib/test-unit.rb: This license and/or LGPLv2.1 or later diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2016-06-12 04:33:11.000000000 +0200 +++ new/README.md 2016-07-19 11:33:53.000000000 +0200 @@ -57,8 +57,8 @@ Exception: - * lib/test/unit/diff.rb is a double license of the Ruby license and - PSF license. + * lib/test/unit/diff.rb is a triple license of the Ruby license, + PSF license and LGPLv2.1 or later. * lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later. Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/doc/text/news.md new/doc/text/news.md --- old/doc/text/news.md 2016-06-12 04:33:11.000000000 +0200 +++ new/doc/text/news.md 2016-07-19 11:33:53.000000000 +0200 @@ -1,5 +1,23 @@ # News +## 3.2.1 - 2016-07-19 {#version-3-2-1} + +### Improvements + + * Clarified lib/test/unit/diff.rb license. It's a triple license of + the Ruby license, PSF license and LGPLv2.1 or later. + [Reported by Luisa Pace] + + * Reported norification when data driven test doesn't have + parameter. + [GitHub#122][Reported by Satoshi "Moris" Tagomori] + +### Thanks + + * Luisa Pace + + * Satoshi "Moris" Tagomori + ## 3.2.0 - 2016-06-12 {#version-3-2-0} ### Improvements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/diff.rb new/lib/test/unit/diff.rb --- old/lib/test/unit/diff.rb 2016-06-12 04:33:11.000000000 +0200 +++ new/lib/test/unit/diff.rb 2016-07-19 11:33:53.000000000 +0200 @@ -3,9 +3,9 @@ # Copyright (c) 2001-2008 Python Software Foundation; All Rights Reserved # Copyright (c) 2008-2011 Kouhei Sutou; All Rights Reserved # -# It is free software, and is distributed under the Ruby -# license and/or the PSF license. See the COPYING file and -# PSFL file. +# It is free software, and is distributed under the Ruby license, the +# PSF license and/or LGPLv2.1 or later. See the COPYING file, the PSFL +# file and the LGPL file. module Test module Unit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/testcase.rb new/lib/test/unit/testcase.rb --- old/lib/test/unit/testcase.rb 2016-06-12 04:33:11.000000000 +0200 +++ new/lib/test/unit/testcase.rb 2016-07-19 11:33:53.000000000 +0200 @@ -365,6 +365,11 @@ # @option query [String] :method_name (nil) # the method name for a test. def test_defined?(query) + locations = find_locations(query) + not locations.empty? + end + + def find_locations(query) query_path = query[:path] query_line = query[:line] query_method_name = query[:method_name] @@ -377,19 +382,19 @@ available_location = available_locations.find do |location| query_line >= location[:line] end - return false if available_location.nil? - return false if available_location[:test_case] != self + return [] if available_location.nil? + return [] if available_location[:test_case] != self available_locations = [available_location] end if query_method_name available_location = available_locations.find do |location| query_method_name == location[:method_name] end - return false if available_location.nil? + return [] if available_location.nil? available_locations = [available_location] end - not available_locations.empty? + available_locations end private @@ -441,9 +446,7 @@ def valid? # :nodoc: return false unless respond_to?(@method_name) test_method = method(@method_name) - if @internal_data.have_test_data? - return false unless test_method.arity == 1 - else + unless @internal_data.have_test_data? return false unless test_method.arity <= 0 end owner = Util::MethodOwnerFinder.find(self, @method_name) @@ -733,13 +736,24 @@ end def run_test + signature = "#{self.class}\##{@method_name}" redefined_info = self[:redefined] if redefined_info - notify("#{self.class}\##{@method_name} was redefined", + notify("#{signature} was redefined", :backtrace => redefined_info[:backtrace]) end if @internal_data.have_test_data? - __send__(@method_name, @internal_data.test_data) + test_method = method(@method_name) + if test_method.arity == 1 or test_method.arity < 0 + __send__(@method_name, @internal_data.test_data) + else + locations = self.class.find_locations(:method_name => @method_name) + backtrace = locations.collect do |location| + "#{location[:path]}:#{location[:line]}" + end + notify("#{signature} misses a parameter to take test data", + :backtrace => backtrace) + end else __send__(@method_name) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/version.rb new/lib/test/unit/version.rb --- old/lib/test/unit/version.rb 2016-06-12 04:33:11.000000000 +0200 +++ new/lib/test/unit/version.rb 2016-07-19 11:33:53.000000000 +0200 @@ -1,5 +1,5 @@ module Test module Unit - VERSION = '3.2.0' + VERSION = '3.2.1' end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-06-12 04:33:11.000000000 +0200 +++ new/metadata 2016-07-19 11:33:53.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: test-unit version: !ruby/object:Gem::Version - version: 3.2.0 + version: 3.2.1 platform: ruby authors: - Kouhei Sutou @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2016-06-12 00:00:00.000000000 Z +date: 2016-07-19 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: power_assert diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test-test-case.rb new/test/test-test-case.rb --- old/test/test-test-case.rb 2016-06-12 04:33:11.000000000 +0200 +++ new/test/test-test-case.rb 2016-07-19 11:33:53.000000000 +0200 @@ -543,6 +543,23 @@ assert_predicate(test, :valid?) end + def test_data_driven_test_without_parameter + test_case = Class.new(TestCase) do + data("label" => "value") + def test_without_parameter + end + end + + suite = test_case.suite + assert_equal(["test_without_parameter"], + suite.tests.collect {|test| test.method_name}) + result = TestResult.new + suite.run(result) {} + assert_equal("1 tests, 0 assertions, 0 failures, " + + "0 errors, 0 pendings, 0 omissions, 1 notifications", + result.summary) + end + private def check(message, passed) add_assertion