forked from pool/python-libarchive
- Add denose_tests.patch removing the need for nose
(gh#dsoprea/PyEasyArchive#44). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libarchive?expand=0&rev=15
This commit is contained in:
46
denose_tests.patch
Normal file
46
denose_tests.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
--- /dev/null
|
||||
+++ b/tests/__init__.py
|
||||
@@ -0,0 +1 @@
|
||||
+# This file intentionally left blank.
|
||||
--- a/tests/adapters/test_archive_read.py
|
||||
+++ b/tests/adapters/test_archive_read.py
|
||||
@@ -86,4 +86,4 @@ class TestArchiveRead(unittest.TestCase)
|
||||
u'README.rst': u'libarchive/resources/README.rst',
|
||||
}
|
||||
|
||||
- self.assertEquals(index, expected)
|
||||
+ self.assertEqual(index, expected)
|
||||
--- a/tests/adapters/test_archive_write.py
|
||||
+++ b/tests/adapters/test_archive_write.py
|
||||
@@ -51,7 +51,7 @@ class TestArchiveWrite(unittest.TestCase
|
||||
'libarchive/resources/requirements.txt',
|
||||
]
|
||||
|
||||
- self.assertEquals(actual, expected)
|
||||
+ self.assertEqual(actual, expected)
|
||||
|
||||
def test_create_file__unicode(self):
|
||||
with libarchive.test_support.chdir(_APP_PATH):
|
||||
@@ -101,4 +101,4 @@ class TestArchiveWrite(unittest.TestCase
|
||||
unicode_test_filepath.lstrip(os.sep),
|
||||
]
|
||||
|
||||
- self.assertEquals(actual, expected)
|
||||
+ self.assertEqual(actual, expected)
|
||||
--- a/tests/types/test_archive_entry.py
|
||||
+++ b/tests/types/test_archive_entry.py
|
||||
@@ -29,7 +29,7 @@ class TestArchiveEntry(unittest.TestCase
|
||||
libarchive.constants.archive_entry.AE_IFBLK | \
|
||||
libarchive.constants.archive_entry.AE_IFMT
|
||||
|
||||
- self.assertEquals(n, expected_n)
|
||||
+ self.assertEqual(n, expected_n)
|
||||
|
||||
recovered = libarchive.types.archive_entry.int_to_ef(n)
|
||||
|
||||
@@ -43,4 +43,4 @@ class TestArchiveEntry(unittest.TestCase
|
||||
IFDIR=True,
|
||||
IFIFO=True)
|
||||
|
||||
- self.assertEquals(recovered, expected_ef)
|
||||
+ self.assertEqual(recovered, expected_ef)
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 30 15:43:52 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add denose_tests.patch removing the need for nose
|
||||
(gh#dsoprea/PyEasyArchive#44).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 3 12:13:41 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ Summary: Python adapter for universal, libarchive-based archive access
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/dsoprea/PyEasyArchive
|
||||
Source: https://files.pythonhosted.org/packages/source/l/libarchive/libarchive-%{version}.tar.gz
|
||||
# PATCH-FEATURE-UPSTREAM denose_tests.patch gh#dsoprea/PyEasyArchive#44 mcepl@suse.com
|
||||
# Removes the need for nose test requirement
|
||||
Patch0: denose_tests.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libarchive-devel
|
||||
@@ -33,7 +36,7 @@ Requires: libarchive-devel
|
||||
Conflicts: python-libarchive-c
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module nose}
|
||||
BuildRequires: %{python_module pytest}
|
||||
# /SECTION
|
||||
%ifpython2
|
||||
Conflicts: %{oldpython}-libarchive-c
|
||||
@@ -46,14 +49,15 @@ A ctypes-based adapter to libarchive.
|
||||
|
||||
%prep
|
||||
%setup -q -n libarchive-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%check
|
||||
# https://github.com/dsoprea/PyEasyArchive/issues/33
|
||||
export LANG=en_US.UTF8
|
||||
%python_expand nosetests-%{$python_bin_suffix} -v -e test_read_symlinks
|
||||
# excluded test due to gh#dsoprea/PyEasyArchive#33
|
||||
%pytest -k 'not test_read_symlinks'
|
||||
|
||||
%install
|
||||
%python_install
|
||||
|
||||
Reference in New Issue
Block a user