Hello community,

here is the log from the commit of package python3-unittest-xml-reporting for 
openSUSE:Factory checked in at 2016-04-11 09:14:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-unittest-xml-reporting (Old)
 and      /work/SRC/openSUSE:Factory/.python3-unittest-xml-reporting.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-unittest-xml-reporting"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python3-unittest-xml-reporting/python3-unittest-xml-reporting.changes
    2015-11-16 18:52:13.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python3-unittest-xml-reporting.new/python3-unittest-xml-reporting.changes
       2016-04-11 10:26:58.000000000 +0200
@@ -1,0 +2,52 @@
+Sat Apr  9 16:38:41 UTC 2016 - a...@gmx.de
+
+- specfile:
+  * update copyright year
+  * require setuptools
+
+- update to version 2.1.0:
+  * Add number of skipped testcases
+  * trivial coverage fix (py26/unittest2 cleanup)
+  * trivial coverage fixup
+  * validate against jenkins/xunit-plugin junit-10.xsd
+  * add test for resultclass.
+  * more coverage for django runner
+  * fix coverage for testsuite.py
+  * fix coverage for setup.py
+
+- changes from version 2.0.0:
+  * Float django versions
+  * test multiple reports vs. single report.
+  * Update README.md
+  * use .coveragerc (exclude random stuff from coverage)
+  * use --include rather than --omit for coverage
+  * Add more tests for the django test runner.
+  * travis: try to split build matrix.
+  * pass in an infoclass to resultclass
+  * add resultclass for runner instanciation
+  * coveralls is flaky - ignore result
+  * pep8 / flake8 for test code.
+  * Fix tox.ini - not testing with outdated django
+  * :boom: stop testing 2.6
+  * :boom: remove unittest2 stuff
+  * :boom: DROP python 2.6 support
+  * add make test
+  * add a makefile... just so I can release more easily
+
+- changes from version 1.14.0:
+  * fix coveralls badge
+  * Bump Django deps version
+  * Update Travis configuration to use tox-travis
+  * Use codecov and coveralls.
+  * Clean up tests/django_test.py.
+  * Update Django testing to use the currently supported versions.
+  * Document Python 3 version requirement.
+  * Generate classname from test data
+  * readme - with tests!
+  * Add more quality checks to tox config.
+  * fix some more code smells.
+  * remove some of the code smells.
+  * Remove pinned version for coverage.
+  * fix badges.
+
+-------------------------------------------------------------------

Old:
----
  unittest-xml-reporting-1.13.0.tar.gz

New:
----
  unittest-xml-reporting-2.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-unittest-xml-reporting.spec ++++++
--- /var/tmp/diff_new_pack.dDeWg1/_old  2016-04-11 10:26:59.000000000 +0200
+++ /var/tmp/diff_new_pack.dDeWg1/_new  2016-04-11 10:26:59.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-unittest-xml-reporting
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python3-unittest-xml-reporting
-Version:        1.13.0
+Version:        2.1.0
 Release:        0
 Url:            http://github.com/danielfm/unittest-xml-reporting/tree/master/
 Summary:        PyUnit-based test runner with JUnit like XML reporting
@@ -28,6 +28,7 @@
 BuildRequires:  python3
 BuildRequires:  python3-devel
 BuildRequires:  python3-distribute
+BuildRequires:  python3-setuptools
 BuildRequires:  python3-six >= 1.4.0
 Requires:       python3-xml
 BuildArch:      noarch

++++++ unittest-xml-reporting-1.13.0.tar.gz -> 
unittest-xml-reporting-2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unittest-xml-reporting-1.13.0/PKG-INFO 
new/unittest-xml-reporting-2.1.0/PKG-INFO
--- old/unittest-xml-reporting-1.13.0/PKG-INFO  2015-11-15 18:35:43.000000000 
+0100
+++ new/unittest-xml-reporting-2.1.0/PKG-INFO   2016-04-10 07:18:56.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: unittest-xml-reporting
-Version: 1.13.0
+Version: 2.1.0
 Summary: unittest-based test runner with Ant/JUnit like XML reporting.
 Home-page: http://github.com/xmlrunner/unittest-xml-reporting/tree/master/
 Author: Daniel Fernandes Martins
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unittest-xml-reporting-1.13.0/setup.py 
new/unittest-xml-reporting-2.1.0/setup.py
--- old/unittest-xml-reporting-1.13.0/setup.py  2015-11-14 16:42:52.000000000 
+0100
+++ new/unittest-xml-reporting-2.1.0/setup.py   2016-04-10 07:18:19.000000000 
+0200
@@ -15,7 +15,8 @@
 # this is for sdist to work.
 import sys
 if sys.version_info < (2, 7):
-    install_requires += ['unittest2']
+    # python 2.6 no longer supported, use last 1.x release instead.
+    raise RuntimeError('This version requires Python 2.7+')  # pragma: no cover
 
 setup(
     name = 'unittest-xml-reporting',
@@ -45,9 +46,5 @@
     zip_safe = False,
     include_package_data = True,
     install_requires = install_requires,
-    extras_require={
-        # this is for wheels to work
-        ':python_version=="2.6"': ['unittest2'],
-    },
     test_suite = 'tests'
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/unittest-xml-reporting-1.13.0/unittest_xml_reporting.egg-info/PKG-INFO 
new/unittest-xml-reporting-2.1.0/unittest_xml_reporting.egg-info/PKG-INFO
--- old/unittest-xml-reporting-1.13.0/unittest_xml_reporting.egg-info/PKG-INFO  
2015-11-15 18:35:42.000000000 +0100
+++ new/unittest-xml-reporting-2.1.0/unittest_xml_reporting.egg-info/PKG-INFO   
2016-04-10 07:18:56.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: unittest-xml-reporting
-Version: 1.13.0
+Version: 2.1.0
 Summary: unittest-based test runner with Ant/JUnit like XML reporting.
 Home-page: http://github.com/xmlrunner/unittest-xml-reporting/tree/master/
 Author: Daniel Fernandes Martins
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/unittest-xml-reporting-1.13.0/unittest_xml_reporting.egg-info/requires.txt 
new/unittest-xml-reporting-2.1.0/unittest_xml_reporting.egg-info/requires.txt
--- 
old/unittest-xml-reporting-1.13.0/unittest_xml_reporting.egg-info/requires.txt  
    2015-11-15 18:35:42.000000000 +0100
+++ 
new/unittest-xml-reporting-2.1.0/unittest_xml_reporting.egg-info/requires.txt   
    2016-04-10 07:18:56.000000000 +0200
@@ -1,4 +1 @@
 six>=1.4.0
-
-[:python_version=="2.6"]
-unittest2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unittest-xml-reporting-1.13.0/xmlrunner/builder.py 
new/unittest-xml-reporting-2.1.0/xmlrunner/builder.py
--- old/unittest-xml-reporting-1.13.0/xmlrunner/builder.py      2015-11-14 
16:42:52.000000000 +0100
+++ new/unittest-xml-reporting-2.1.0/xmlrunner/builder.py       2016-04-10 
07:18:19.000000000 +0200
@@ -2,7 +2,6 @@
 import sys
 import time
 import six
-from six import unichr
 
 from xml.dom.minidom import Document
 
@@ -21,8 +20,8 @@
 
 if sys.maxunicode > 0x10000:
     _char_tail = six.u('%s-%s') % (
-        unichr(0x10000),
-        unichr(min(sys.maxunicode, 0x10FFFF))
+        six.unichr(0x10000),
+        six.unichr(min(sys.maxunicode, 0x10FFFF))
     )
 
 _nontext_sub = re.compile(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/unittest-xml-reporting-1.13.0/xmlrunner/extra/djangotestrunner.py 
new/unittest-xml-reporting-2.1.0/xmlrunner/extra/djangotestrunner.py
--- old/unittest-xml-reporting-1.13.0/xmlrunner/extra/djangotestrunner.py       
2015-11-14 16:42:52.000000000 +0100
+++ new/unittest-xml-reporting-2.1.0/xmlrunner/extra/djangotestrunner.py        
2016-04-10 07:18:19.000000000 +0200
@@ -10,29 +10,31 @@
 """
 
 import xmlrunner
-import django
+import os.path
 from django.conf import settings
+from django.test.runner import DiscoverRunner
 
-# future compatibilty with django
-# in django 1.6 DiscoverRunner bacame default and
-# DjangoTestSuiteRunner became depecated, will be removed in 1.8
-if django.VERSION < (1, 6):
-    from django.test.simple import DjangoTestSuiteRunner
-    _DjangoRunner = DjangoTestSuiteRunner
-else:
-    from django.test.runner import DiscoverRunner
-    _DjangoRunner = DiscoverRunner
 
-
-class XMLTestRunner(_DjangoRunner):
+class XMLTestRunner(DiscoverRunner):
 
     def run_suite(self, suite, **kwargs):
+        dummy = kwargs  # unused
         verbosity = getattr(settings, 'TEST_OUTPUT_VERBOSE', 1)
         # XXX: verbosity = self.verbosity
         if isinstance(verbosity, bool):
             verbosity = (1, 2)[verbosity]
         descriptions = getattr(settings, 'TEST_OUTPUT_DESCRIPTIONS', False)
-        output = getattr(settings, 'TEST_OUTPUT_DIR', '.')
-        return xmlrunner.XMLTestRunner(
+        output_dir = getattr(settings, 'TEST_OUTPUT_DIR', '.')
+        single_file = getattr(settings, 'TEST_OUTPUT_FILE_NAME', None)
+
+        kwargs = dict(
             verbosity=verbosity, descriptions=descriptions,
-            output=output, failfast=self.failfast).run(suite)
+            failfast=self.failfast)
+        if single_file is not None:
+            file_path = os.path.join(output_dir, single_file)
+            with open(file_path, 'wb') as xml:
+                return xmlrunner.XMLTestRunner(
+                    output=xml, **kwargs).run(suite)
+        else:
+            return xmlrunner.XMLTestRunner(
+                output=output_dir, **kwargs).run(suite)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unittest-xml-reporting-1.13.0/xmlrunner/result.py 
new/unittest-xml-reporting-2.1.0/xmlrunner/result.py
--- old/unittest-xml-reporting-1.13.0/xmlrunner/result.py       2015-11-15 
18:35:16.000000000 +0100
+++ new/unittest-xml-reporting-2.1.0/xmlrunner/result.py        2016-04-10 
07:18:19.000000000 +0200
@@ -6,7 +6,6 @@
 import six
 import re
 from os import path
-from six import unichr
 from six.moves import StringIO
 
 from .unittest import TestResult, _TextTestResult, failfast
@@ -34,7 +33,7 @@
     ]) 
 
 _illegal_ranges = [
-    "%s-%s" % (unichr(low), unichr(high))
+    "%s-%s" % (six.unichr(low), six.unichr(high))
     for (low, high) in _illegal_unichrs
 ]
 
@@ -141,7 +140,7 @@
     Used by XMLTestRunner.
     """
     def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1,
-                 elapsed_times=True, properties=None):
+                 elapsed_times=True, properties=None, infoclass=None):
         _TextTestResult.__init__(self, stream, descriptions, verbosity)
         self.buffer = True  # we are capturing test output
         self._stdout_data = None
@@ -149,12 +148,16 @@
         self.successes = []
         self.callback = None
         self.elapsed_times = elapsed_times
-        self.properties = None  # junit testsuite properties
+        self.properties = properties  # junit testsuite properties
+        if infoclass is None:
+            self.infoclass = _TestInfo
+        else:
+            self.infoclass = infoclass
 
     def _prepare_callback(self, test_info, target_list, verbose_str,
                           short_str):
         """
-        Appends a _TestInfo to the given target list and sets a callback
+        Appends a `infoclass` to the given target list and sets a callback
         method to be called by stopTest method.
         """
         target_list.append(test_info)
@@ -219,7 +222,7 @@
         """
         self._save_output_data()
         self._prepare_callback(
-            _TestInfo(self, test), self.successes, 'OK', '.'
+            self.infoclass(self, test), self.successes, 'OK', '.'
         )
 
     @failfast
@@ -228,7 +231,8 @@
         Called when a test method fails.
         """
         self._save_output_data()
-        testinfo = _TestInfo(self, test, _TestInfo.FAILURE, err)
+        testinfo = self.infoclass(
+            self, test, self.infoclass.FAILURE, err)
         self.failures.append((
             testinfo,
             self._exc_info_to_string(err, test)
@@ -241,7 +245,8 @@
         Called when a test method raises an error.
         """
         self._save_output_data()
-        testinfo = _TestInfo(self, test, _TestInfo.ERROR, err)
+        testinfo = self.infoclass(
+            self, test, self.infoclass.ERROR, err)
         self.errors.append((
             testinfo,
             self._exc_info_to_string(err, test)
@@ -254,7 +259,8 @@
         """
         if err is not None:
             self._save_output_data()
-            testinfo = _TestInfo(self, testcase, _TestInfo.ERROR, err, 
subTest=test)
+            testinfo = self.infoclass(
+                self, testcase, self.infoclass.ERROR, err, subTest=test)
             self.errors.append((
                 testinfo,
                 self._exc_info_to_string(err, testcase)
@@ -266,7 +272,8 @@
         Called when a test method was skipped.
         """
         self._save_output_data()
-        testinfo = _TestInfo(self, test, _TestInfo.SKIP, reason)
+        testinfo = self.infoclass(
+            self, test, self.infoclass.SKIP, reason)
         self.skipped.append((testinfo, reason))
         self._prepare_callback(testinfo, [], 'SKIP', 'S')
 
@@ -274,7 +281,7 @@
         """
         Writes information about the FAIL or ERROR to the stream.
         """
-        for test_info, error in errors:
+        for test_info, dummy in errors:
             self.stream.writeln(self.separator1)
             self.stream.writeln(
                 '%s [%.3fs]: %s' % (flavour, test_info.elapsed_time,
@@ -316,7 +323,7 @@
 
     _report_testsuite_properties = staticmethod(_report_testsuite_properties)
 
-    def _report_testsuite(suite_name, suite, tests, xml_document, 
parentElement,
+    def _report_testsuite(suite_name, tests, xml_document, parentElement,
                           properties):
         """
         Appends the testsuite section to the XML document.
@@ -330,17 +337,20 @@
         testsuite.setAttribute(
             'time', '%.3f' % sum(map(lambda e: e.elapsed_time, tests))
         )
-        failures = filter(lambda e: e.outcome == _TestInfo.FAILURE, tests)
+        failures = filter(lambda e: e.outcome == e.FAILURE, tests)
         testsuite.setAttribute('failures', str(len(list(failures))))
 
-        errors = filter(lambda e: e.outcome == _TestInfo.ERROR, tests)
+        errors = filter(lambda e: e.outcome == e.ERROR, tests)
         testsuite.setAttribute('errors', str(len(list(errors))))
 
+        skips = filter(lambda e: e.outcome == _TestInfo.SKIP, tests)
+        testsuite.setAttribute('skipped', str(len(list(skips))))
+ 
         _XMLTestResult._report_testsuite_properties(
             testsuite, xml_document, properties)
 
         for test in tests:
-            _XMLTestResult._report_testcase(suite, test, testsuite, 
xml_document)
+            _XMLTestResult._report_testcase(test, testsuite, xml_document)
 
         systemout = xml_document.createElement('system-out')
         testsuite.appendChild(systemout)
@@ -390,24 +400,26 @@
 
     _createCDATAsections = staticmethod(_createCDATAsections)
 
-    def _report_testcase(suite_name, test_result, xml_testsuite, xml_document):
+    def _report_testcase(test_result, xml_testsuite, xml_document):
         """
         Appends a testcase section to the XML document.
         """
         testcase = xml_document.createElement('testcase')
         xml_testsuite.appendChild(testcase)
 
-        testcase.setAttribute('classname', suite_name)
+        class_name = re.sub(r'^__main__.', '', test_result.id())
+        class_name = class_name.rpartition('.')[0]
+        testcase.setAttribute('classname', class_name)
         testcase.setAttribute(
             'name', _XMLTestResult._test_method_name(test_result.test_id)
         )
         testcase.setAttribute('time', '%.3f' % test_result.elapsed_time)
 
-        if (test_result.outcome != _TestInfo.SUCCESS):
+        if (test_result.outcome != test_result.SUCCESS):
             elem_name = ('failure', 'error', 'skipped')[test_result.outcome-1]
             failure = xml_document.createElement(elem_name)
             testcase.appendChild(failure)
-            if test_result.outcome != _TestInfo.SKIP:
+            if test_result.outcome != test_result.SKIP:
                 failure.setAttribute(
                     'type',
                     safe_unicode(test_result.err[0].__name__)
@@ -456,7 +468,7 @@
 
             # Build the XML file
             testsuite = _XMLTestResult._report_testsuite(
-                suite_name, suite, tests, doc, parentElement, self.properties
+                suite_name, tests, doc, parentElement, self.properties
             )
             xml_content = doc.toprettyxml(
                 indent='\t',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unittest-xml-reporting-1.13.0/xmlrunner/runner.py 
new/unittest-xml-reporting-2.1.0/xmlrunner/runner.py
--- old/unittest-xml-reporting-1.13.0/xmlrunner/runner.py       2015-11-14 
20:57:49.000000000 +0100
+++ new/unittest-xml-reporting-2.1.0/xmlrunner/runner.py        2016-04-10 
07:18:19.000000000 +0200
@@ -16,7 +16,8 @@
     """
     def __init__(self, output='.', outsuffix=None, stream=sys.stderr,
                  descriptions=True, verbosity=1, elapsed_times=True,
-                 failfast=False, buffer=False, encoding=UTF8):
+                 failfast=False, buffer=False, encoding=UTF8,
+                 resultclass=None):
         TextTestRunner.__init__(self, stream, descriptions, verbosity,
                                 failfast=failfast, buffer=buffer)
         self.verbosity = verbosity
@@ -28,13 +29,18 @@
             outsuffix = time.strftime("%Y%m%d%H%M%S")
         self.outsuffix = outsuffix
         self.elapsed_times = elapsed_times
+        if resultclass is None:
+            self.resultclass = _XMLTestResult
+        else:
+            self.resultclass = resultclass
 
     def _make_result(self):
         """
         Creates a TestResult object which will be used to store
         information about the executed tests.
         """
-        return _XMLTestResult(
+        # override in subclasses if necessary.
+        return self.resultclass(
             self.stream, self.descriptions, self.verbosity, self.elapsed_times
         )
 
@@ -70,15 +76,10 @@
             )
             self.stream.writeln()
 
-            expectedFails = unexpectedSuccesses = skipped = 0
-            try:
-                results = map(len, (result.expectedFailures,
-                                    result.unexpectedSuccesses,
-                                    result.skipped))
-            except AttributeError:
-                pass
-            else:
-                expectedFails, unexpectedSuccesses, skipped = results
+            # other metrics
+            expectedFails = len(result.expectedFailures)
+            unexpectedSuccesses = len(result.unexpectedSuccesses)
+            skipped = len(result.skipped)
 
             # Error traces
             infos = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unittest-xml-reporting-1.13.0/xmlrunner/unittest.py 
new/unittest-xml-reporting-2.1.0/xmlrunner/unittest.py
--- old/unittest-xml-reporting-1.13.0/xmlrunner/unittest.py     2015-11-14 
20:57:49.000000000 +0100
+++ new/unittest-xml-reporting-2.1.0/xmlrunner/unittest.py      2016-04-10 
07:18:19.000000000 +0200
@@ -2,25 +2,17 @@
 from __future__ import absolute_import
 
 import sys
-if sys.version_info < (2, 7):
-    # pylint: disable-msg=W0611
-    import unittest2 as unittest
-    from unittest2.runner import TextTestRunner
-    from unittest2.runner import TextTestResult as _TextTestResult
-    from unittest2.result import TestResult, failfast
-    from unittest2.main import TestProgram
-else:
-    # pylint: disable-msg=W0611
-    import unittest
-    from unittest import TextTestRunner
-    from unittest import TestResult, _TextTestResult
-    from unittest.result import failfast
-    from unittest.main import TestProgram
-    try:
-        from unittest.main import USAGE_AS_MAIN
-        TestProgram.USAGE = USAGE_AS_MAIN
-    except ImportError:
-        pass
+# pylint: disable-msg=W0611
+import unittest
+from unittest import TextTestRunner
+from unittest import TestResult, _TextTestResult
+from unittest.result import failfast
+from unittest.main import TestProgram
+try:
+    from unittest.main import USAGE_AS_MAIN
+    TestProgram.USAGE = USAGE_AS_MAIN
+except ImportError:
+    pass
 
 __all__ = (
     'unittest', 'TextTestRunner', 'TestResult', '_TextTestResult',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unittest-xml-reporting-1.13.0/xmlrunner/version.py 
new/unittest-xml-reporting-2.1.0/xmlrunner/version.py
--- old/unittest-xml-reporting-1.13.0/xmlrunner/version.py      2015-11-15 
18:35:16.000000000 +0100
+++ new/unittest-xml-reporting-2.1.0/xmlrunner/version.py       2016-04-10 
07:18:19.000000000 +0200
@@ -1,2 +1,2 @@
 
-__version__ = '1.13.0'
+__version__ = '2.1.0'


Reply via email to