Hello community,

here is the log from the commit of package subunit for openSUSE:Factory checked 
in at 2020-06-10 00:33:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/subunit (Old)
 and      /work/SRC/openSUSE:Factory/.subunit.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "subunit"

Wed Jun 10 00:33:32 2020 rev:5 rq:811713 version:1.4.0+git.1584197985.0e9f67b

Changes:
--------
--- /work/SRC/openSUSE:Factory/subunit/subunit.changes  2020-04-19 
21:48:36.211976485 +0200
+++ /work/SRC/openSUSE:Factory/.subunit.new.3606/subunit.changes        
2020-06-10 00:33:34.004615768 +0200
@@ -1,0 +2,5 @@
+Fri Jun  5 08:36:13 UTC 2020 - Matej Cepl <[email protected]>
+
+- Add remove_unittest2.patch to remove dependency on unittest2
+
+-------------------------------------------------------------------

New:
----
  remove_unittest2.patch

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

Other differences:
------------------
++++++ subunit.spec ++++++
--- /var/tmp/diff_new_pack.KXOtye/_old  2020-06-10 00:33:35.024618537 +0200
+++ /var/tmp/diff_new_pack.KXOtye/_new  2020-06-10 00:33:35.028618548 +0200
@@ -33,6 +33,9 @@
 # PATCH-FIX-UPSTREAM python38-failing-tests.patch [email protected]
 # skip tests failing with Python 3.8+
 Patch0:         python38-failing-tests.patch
+# patch-feature-upstream remove_unittest2.patch gh#testing-cabal/subunit#32 
[email protected]
+# Remove dependency on unittest2
+Patch1:         remove_unittest2.patch
 BuildRequires:  %{python_module docutils}
 BuildRequires:  %{python_module extras}
 BuildRequires:  %{python_module fixtures}
@@ -41,7 +44,6 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module testscenarios}
 BuildRequires:  %{python_module testtools >= 1.8.0}
-BuildRequires:  %{python_module unittest2}
 BuildRequires:  check-devel
 BuildRequires:  cppunit-devel
 BuildRequires:  fdupes

++++++ remove_unittest2.patch ++++++
--- a/python/subunit/tests/test_test_protocol.py
+++ b/python/subunit/tests/test_test_protocol.py
@@ -16,10 +16,9 @@
 
 import datetime
 import io
-import unittest2 as unittest
 import os
-import sys
 import tempfile
+import unittest
 
 from testtools import PlaceHolder, skipIf, TestCase, TestResult
 from testtools.compat import _b, _u, BytesIO
@@ -38,6 +37,7 @@ except ImportError:
         ExtendedTestResult,
         )
 from testtools.matchers import Contains
+from testtools.testcase import six
 
 import subunit
 from subunit.tests import (
@@ -60,7 +60,7 @@ class TestHelpers(TestCase):
         fd, file_path = tempfile.mkstemp()
         self.addCleanup(os.remove, file_path)
         fake_file = os.fdopen(fd, 'r')
-        if sys.version_info > (3, 0):
+        if six.PY3:
             self.assertEqual(fake_file.buffer,
                              subunit._unwrap_text(fake_file))
         else:
@@ -70,7 +70,7 @@ class TestHelpers(TestCase):
         fd, file_path = tempfile.mkstemp()
         self.addCleanup(os.remove, file_path)
         fake_file = os.fdopen(fd, 'w')
-        if sys.version_info > (3, 0):
+        if six.PY3:
             self.assertEqual(fake_file.buffer,
                              subunit._unwrap_text(fake_file))
         else:
@@ -152,13 +152,20 @@ class TestTestProtocolServerPipe(unittes
         protocol.readFrom(pipe)
         bing = subunit.RemotedTestCase("bing crosby")
         an_error = subunit.RemotedTestCase("an error")
-        self.assertEqual(
-            client.errors,
-            [(an_error, tb_prelude + _remote_exception_repr + '\n')])
-        self.assertEqual(
-            client.failures,
-            [(bing, tb_prelude + _remote_exception_repr + ": "
-              + details_to_str({'traceback': text_content(traceback)}) + 
"\n")])
+        if six.PY3:
+            self.assertEqual(client.errors,
+                             [(an_error, _remote_exception_repr + '\n')])
+            self.assertEqual(
+                client.failures,
+                [(bing, _remote_exception_repr + ": "
+                  + details_to_str({'traceback': text_content(traceback)}) + 
"\n")])
+        else:
+            self.assertEqual(client.errors,
+                             [(an_error, '_StringException\n')])
+            self.assertEqual(
+                client.failures,
+                [(bing, "_StringException: "
+                  + details_to_str({'traceback': text_content(traceback)}) + 
"\n")])
         self.assertEqual(client.testsRun, 3)
 
     def test_non_test_characters_forwarded_immediately(self):
@@ -1012,9 +1019,14 @@ class TestRemotedTestCase(unittest.TestC
                          "'A test description'>", "%r" % test)
         result = unittest.TestResult()
         test.run(result)
-        self.assertEqual([(test, tb_prelude + _remote_exception_repr + ": "
-                                 "Cannot run RemotedTestCases.\n\n")],
-                         result.errors)
+        if six.PY3:
+            self.assertEqual([(test, _remote_exception_repr + ': ' +
+                                     "Cannot run RemotedTestCases.\n\n")],
+                             result.errors)
+        else:
+            self.assertEqual([(test, "_StringException: " +
+                                     "Cannot run RemotedTestCases.\n\n")],
+                             result.errors)
         self.assertEqual(1, result.testsRun)
         another_test = subunit.RemotedTestCase("A test description")
         self.assertEqual(test, another_test)

Reply via email to