forked from pool/python-whatthepatch
Accepting request 1036185 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1036185 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-whatthepatch?expand=0&rev=3
This commit is contained in:
@@ -1,83 +0,0 @@
|
||||
Index: whatthepatch-1.0.0/tests/test_apply.py
|
||||
===================================================================
|
||||
--- whatthepatch-1.0.0.orig/tests/test_apply.py
|
||||
+++ whatthepatch-1.0.0/tests/test_apply.py
|
||||
@@ -4,7 +4,7 @@ import whatthepatch as wtp
|
||||
from whatthepatch import exceptions
|
||||
from whatthepatch.snippets import which
|
||||
|
||||
-from nose.tools import assert_raises
|
||||
+import pytest
|
||||
import unittest
|
||||
from unittest.case import SkipTest
|
||||
|
||||
@@ -26,7 +26,7 @@ class ApplyTestSuite(unittest.TestCase):
|
||||
self.lao = f.read().splitlines()
|
||||
|
||||
with open("tests/casefiles/tzu") as f:
|
||||
- self.tzu = f.read().splitlines()
|
||||
+ self.tzu = f.read().splitlines()
|
||||
|
||||
def test_truth(self):
|
||||
self.assertEqual(type(self.lao), list)
|
||||
@@ -59,10 +59,10 @@ class ApplyTestSuite(unittest.TestCase):
|
||||
with open("tests/casefiles/diff-unified-bad.diff") as f:
|
||||
diff_text = f.read()
|
||||
|
||||
- with assert_raises(exceptions.ApplyException) as ec:
|
||||
+ with pytest.raises(exceptions.ApplyException) as ec:
|
||||
_apply(self.lao, diff_text)
|
||||
|
||||
- e = ec.exception
|
||||
+ e = ec.value
|
||||
e_str = str(e)
|
||||
assert "line 4" in e_str
|
||||
assert "The Named is the mother of all tings." in e_str
|
||||
@@ -73,10 +73,10 @@ class ApplyTestSuite(unittest.TestCase):
|
||||
with open("tests/casefiles/diff-unified-bad2.diff") as f:
|
||||
diff_text = f.read()
|
||||
|
||||
- with assert_raises(exceptions.ApplyException) as ec:
|
||||
+ with pytest.raises(exceptions.ApplyException) as ec:
|
||||
_apply(self.lao, diff_text)
|
||||
|
||||
- e = ec.exception
|
||||
+ e = ec.value
|
||||
e_str = str(e)
|
||||
assert "line 9" in e_str
|
||||
assert "The two are te same," in e_str
|
||||
@@ -87,10 +87,10 @@ class ApplyTestSuite(unittest.TestCase):
|
||||
with open("tests/casefiles/diff-unified-bad2.diff") as f:
|
||||
diff_text = f.read()
|
||||
|
||||
- with assert_raises(exceptions.ApplyException) as ec:
|
||||
+ with pytest.raises(exceptions.ApplyException) as ec:
|
||||
_apply(self.tzu, diff_text)
|
||||
|
||||
- e = ec.exception
|
||||
+ e = ec.value
|
||||
e_str = str(e)
|
||||
assert "line 1" in e_str
|
||||
assert "The Way that can be told of is not the eternal Way;" in e_str
|
||||
@@ -101,10 +101,10 @@ class ApplyTestSuite(unittest.TestCase):
|
||||
with open("tests/casefiles/diff-unified-bad2.diff") as f:
|
||||
diff_text = f.read()
|
||||
|
||||
- with assert_raises(exceptions.ApplyException) as ec:
|
||||
+ with pytest.raises(exceptions.ApplyException) as ec:
|
||||
_apply("", diff_text)
|
||||
|
||||
- e = ec.exception
|
||||
+ e = ec.value
|
||||
e_str = str(e)
|
||||
assert "line 1" in e_str
|
||||
assert "The Way that can be told of is not the eternal Way;" in e_str
|
||||
@@ -126,7 +126,7 @@ class ApplyTestSuite(unittest.TestCase):
|
||||
new_text = _apply(self.lao, diff_text, use_patch=True)
|
||||
self.assertEqual(new_text, (self.tzu, None))
|
||||
|
||||
- with assert_raises(exceptions.ApplyException):
|
||||
+ with pytest.raises(exceptions.ApplyException):
|
||||
_apply([""] + self.lao, diff_text, use_patch=True)
|
||||
|
||||
def test_diff_rcs(self):
|
||||
@@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 13 22:40:19 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Drop no-nose.patch merged upstream
|
||||
- Update to v1.0.3
|
||||
* Code optimization for unified diff parsing
|
||||
* Package using build module and pyproject.toml
|
||||
* Support up to 3.11
|
||||
* Drop support up to 3.6
|
||||
- from v1.0.2
|
||||
* Support up to 3.9
|
||||
* Fix unified diff parse error
|
||||
- from v1.0.1
|
||||
* Replace nose with pytest
|
||||
* Fix bug where context diffs would not parse
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 21 13:05:20 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-whatthepatch
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,20 +16,21 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-whatthepatch
|
||||
Version: 1.0.0
|
||||
Version: 1.0.3
|
||||
Release: 0
|
||||
Summary: A patch parsing and application library
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/cscorley/whatthepatch
|
||||
Source: https://github.com/cscorley/whatthepatch/archive/%{version}.tar.gz#/whatthepatch-%{version}.tar.gz
|
||||
Patch0: no-nose.patch
|
||||
Source: https://files.pythonhosted.org/packages/source/w/whatthepatch/whatthepatch-%{version}.tar.gz
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: ed
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: patch
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -43,13 +44,13 @@ A patch parsing and application library.
|
||||
|
||||
%prep
|
||||
%setup -q -n whatthepatch-%{version}
|
||||
%patch0 -p1
|
||||
dos2unix README.rst
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@@ -58,6 +59,6 @@ A patch parsing and application library.
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/whatthepatch*/
|
||||
|
||||
%changelog
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0737f991fc80172b8b8dfa48de6f4d82b0c4758a5e1a62cc74d834b73c0c6e8e
|
||||
size 32971
|
||||
3
whatthepatch-1.0.3.tar.gz
Normal file
3
whatthepatch-1.0.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5983a49f751158a7b5c62baf55aaf815728d3d80bf5dd0c5acb2d7d3d7391ee
|
||||
size 28634
|
||||
Reference in New Issue
Block a user