Hello community,

here is the log from the commit of package python-lockfile for openSUSE:Factory 
checked in at 2020-08-25 12:37:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-lockfile (Old)
 and      /work/SRC/openSUSE:Factory/.python-lockfile.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-lockfile"

Tue Aug 25 12:37:42 2020 rev:16 rq:827219 version:0.12.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-lockfile/python-lockfile.changes  
2019-02-26 22:22:45.290058625 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-lockfile.new.3399/python-lockfile.changes    
    2020-08-25 12:37:47.833403498 +0200
@@ -1,0 +2,6 @@
+Sun Aug 16 15:16:13 UTC 2020 - John Vandenberg <[email protected]>
+
+- Add convert-to-unittest.patch to switch from nose to pytest
+- Add %fdupes
+
+-------------------------------------------------------------------

New:
----
  convert-to-unittest.patch

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

Other differences:
------------------
++++++ python-lockfile.spec ++++++
--- /var/tmp/diff_new_pack.sJizUp/_old  2020-08-25 12:37:48.945403707 +0200
+++ /var/tmp/diff_new_pack.sJizUp/_new  2020-08-25 12:37:48.949403708 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-lockfile
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,9 +26,11 @@
 URL:            https://github.com/openstack/pylockfile
 Source:         
https://files.pythonhosted.org/packages/source/l/lockfile/lockfile-%{version}.tar.gz
 Patch0:         %{name}-empty_ident.patch
-BuildRequires:  %{python_module nose}
+Patch1:         convert-to-unittest.patch
 BuildRequires:  %{python_module pbr}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch
 %python_subpackages
@@ -47,16 +49,18 @@
 %setup -q -n lockfile-%{version}
 # current thread has ident = None, which causes a TypeError
 # http://code.google.com/p/pylockfile/issues/detail?id=8
-%patch0 -p1 -b .empty_ident
+%patch0 -p1
+%patch1 -p1
 
 %build
 %python_build
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec -m nose
+%pytest
 
 %files %{python_files}
 %license LICENSE

++++++ convert-to-unittest.patch ++++++
diff -ur lockfile-0.12.2-orig/test/compliancetest.py 
lockfile-0.12.2/test/compliancetest.py
--- lockfile-0.12.2-orig/test/compliancetest.py 2015-11-26 01:29:13.000000000 
+0700
+++ lockfile-0.12.2/test/compliancetest.py      2020-08-16 07:58:15.176973406 
+0700
@@ -1,23 +1,22 @@
 import os
 import threading
 import shutil
+import unittest
 
 import lockfile
 
 
 class ComplianceTest(object):
-    def __init__(self):
-        self.saved_class = lockfile.LockFile
-
     def _testfile(self):
         """Return platform-appropriate file.  Helper for tests."""
         import tempfile
         return os.path.join(tempfile.gettempdir(), 'trash-%s' % os.getpid())
 
-    def setup(self):
-        lockfile.LockFile = self.class_to_test
+    def setUp(self):
+        self.saved_class = lockfile.LockFile
+        lockfile.LockFile = getattr(self, 'class_to_test', None)
 
-    def teardown(self):
+    def tearDown(self):
         try:
             tf = self._testfile()
             if os.path.isdir(tf):
diff -ur lockfile-0.12.2-orig/test/test_lockfile.py 
lockfile-0.12.2/test/test_lockfile.py
--- lockfile-0.12.2-orig/test/test_lockfile.py  2015-11-26 01:29:13.000000000 
+0700
+++ lockfile-0.12.2/test/test_lockfile.py       2020-08-16 07:58:49.461371422 
+0700
@@ -1,3 +1,5 @@
+import unittest
+
 import lockfile.linklockfile
 import lockfile.mkdirlockfile
 import lockfile.pidlockfile
@@ -6,28 +8,28 @@
 from compliancetest import ComplianceTest
 
 
-class TestLinkLockFile(ComplianceTest):
+class TestLinkLockFile(ComplianceTest, unittest.TestCase):
     class_to_test = lockfile.linklockfile.LinkLockFile
 
 
-class TestSymlinkLockFile(ComplianceTest):
+class TestSymlinkLockFile(ComplianceTest, unittest.TestCase):
     class_to_test = lockfile.symlinklockfile.SymlinkLockFile
 
 
-class TestMkdirLockFile(ComplianceTest):
+class TestMkdirLockFile(ComplianceTest, unittest.TestCase):
     class_to_test = lockfile.mkdirlockfile.MkdirLockFile
 
 
-class TestPIDLockFile(ComplianceTest):
+class TestPIDLockFile(ComplianceTest, unittest.TestCase):
     class_to_test = lockfile.pidlockfile.PIDLockFile
 
 
 # Check backwards compatibility
-class TestLinkFileLock(ComplianceTest):
+class TestLinkFileLock(ComplianceTest, unittest.TestCase):
     class_to_test = lockfile.LinkFileLock
 
 
-class TestMkdirFileLock(ComplianceTest):
+class TestMkdirFileLock(ComplianceTest, unittest.TestCase):
     class_to_test = lockfile.MkdirFileLock
 
 try:
@@ -37,5 +39,5 @@
 else:
     import lockfile.sqlitelockfile
 
-    class TestSQLiteLockFile(ComplianceTest):
+    class TestSQLiteLockFile(ComplianceTest, unittest.TestCase):
         class_to_test = lockfile.sqlitelockfile.SQLiteLockFile

Reply via email to