Hello community,

here is the log from the commit of package python-dbfread for openSUSE:Factory 
checked in at 2019-11-03 12:11:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dbfread (Old)
 and      /work/SRC/openSUSE:Factory/.python-dbfread.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-dbfread"

Sun Nov  3 12:11:59 2019 rev:4 rq:744751 version:2.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dbfread/python-dbfread.changes    
2019-08-23 11:07:39.442473861 +0200
+++ /work/SRC/openSUSE:Factory/.python-dbfread.new.2990/python-dbfread.changes  
2019-11-03 12:12:03.980564081 +0100
@@ -1,0 +2,6 @@
+Fri Nov  1 13:49:17 CET 2019 - Matej Cepl <[email protected]>
+
+- Add pytest4.patch from gh#olemb/dbfread#33 which makes the test
+  suite to pass with PyTest 4.
+
+-------------------------------------------------------------------

New:
----
  pytest4.patch

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

Other differences:
------------------
++++++ python-dbfread.spec ++++++
--- /var/tmp/diff_new_pack.tAIHpF/_old  2019-11-03 12:12:04.720565134 +0100
+++ /var/tmp/diff_new_pack.tAIHpF/_new  2019-11-03 12:12:04.724565139 +0100
@@ -25,7 +25,9 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/olemb/dbfread
 Source:         
https://files.pythonhosted.org/packages/source/d/dbfread/dbfread-%{version}.tar.gz
-BuildRequires:  %{python_module pytest < 4}
+# gh#olemb/dbfread#33
+Patch0:         pytest4.patch
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -39,7 +41,7 @@
 batch jobs and one-off scripts.
 
 %prep
-%setup -q -n dbfread-%{version}
+%autosetup -p1 -n dbfread-%{version}
 
 %build
 %python_build

++++++ pytest4.patch ++++++
>From 53d56bd2c6080280798b021c596c9d783ad832dc Mon Sep 17 00:00:00 2001
From: Stanislav Levin <[email protected]>
Date: Wed, 29 May 2019 12:01:38 +0300
Subject: [PATCH] Fix Pytest4.x compatibility errors

The next two errors were fixed:
```
[pytest] sections in setup.cfg files should now be named [tool:pytest] to
avoid conflicts with other distutils commands.
```

```
Calling a fixture function directly, as opposed to request them in a test
function, is deprecated.
```

Signed-off-by: Stanislav Levin <[email protected]>
---
 dbfread/test_read_and_length.py | 22 +++++++++++-----------
 setup.cfg                       |  2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)

--- a/dbfread/test_read_and_length.py
+++ b/dbfread/test_read_and_length.py
@@ -24,19 +24,19 @@ deleted_records = [{u'NAME': u'Deleted G
                     u'BIRTHDATE': datetime.date(1979, 12, 22),
                     u'MEMO': u'Deleted Guy memo'}]
 
-def test_len():
-    assert len(table()) == 2
-    assert len(table().deleted) == 1
+def test_len(table, loaded_table):
+    assert len(table) == 2
+    assert len(table.deleted) == 1
 
-    assert len(loaded_table()) == 2
-    assert len(loaded_table().deleted) == 1
+    assert len(loaded_table) == 2
+    assert len(loaded_table.deleted) == 1
 
-def test_list():
-    assert list(table()) == records
-    assert list(table().deleted) == deleted_records
+def test_list(table, loaded_table):
+    assert list(table) == records
+    assert list(table.deleted) == deleted_records
     
-    assert list(loaded_table()) == records
-    assert list(loaded_table().deleted) == deleted_records
+    assert list(loaded_table) == records
+    assert list(loaded_table.deleted) == deleted_records
 
     # This should not return old style table which was a subclass of list.
-    assert not isinstance(table(), list)
+    assert not isinstance(table, list)
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,7 +3,7 @@ universal = 1
 
 [easy_install]
 
-[pytest]
+[tool:pytest]
 norecursedirs = build dist examples
 
 [egg_info]

Reply via email to