Hello community,
here is the log from the commit of package python-minidb for openSUSE:Factory
checked in at 2020-03-27 22:01:53
Comparing /work/SRC/openSUSE:Factory/python-minidb (Old)
and /work/SRC/openSUSE:Factory/.python-minidb.new.3160 (New)
Package is "python-minidb"
Fri Mar 27 22:01:53 2020 rev:4 rq:789080 version:2.0.3
Changes:
--- /work/SRC/openSUSE:Factory/python-minidb/python-minidb.changes
2018-12-24 11:39:43.621540750 +0100
+++ /work/SRC/openSUSE:Factory/.python-minidb.new.3160/python-minidb.changes
2020-03-27 22:01:55.326954157 +0100
@@ -1,0 +2,6 @@
+Fri Mar 27 14:01:08 UTC 2020 - Paolo Stivanin
+
+- Update to 2.0.3
+- Add 0001-switch-to-pytest.patch
+
+---
Old:
minidb-2.0.2.tar.gz
New:
0001-switch-to-pytest.patch
minidb-2.0.3.tar.gz
Other differences:
--
++ python-minidb.spec ++
--- /var/tmp/diff_new_pack.Vx0uAP/_old 2020-03-27 22:01:56.094954604 +0100
+++ /var/tmp/diff_new_pack.Vx0uAP/_new 2020-03-27 22:01:56.106954611 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-minidb
#
-# Copyright (c) 2018 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
@@ -20,17 +20,19 @@
%define skip_python2 1
%bcond_without test
Name: python-minidb
-Version:2.0.2
+Version:2.0.3
Release:0
Summary:SQLite3-based store for Python objects
License:ISC
Group: Development/Languages/Python
-Url:http://thp.io/2010/minidb/
+URL:http://thp.io/2010/minidb/
Source:
https://files.pythonhosted.org/packages/source/m/minidb/minidb-%{version}.tar.gz
+# https://github.com/thp/minidb/pull/14
+Patch0: 0001-switch-to-pytest.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %{with test}
-BuildRequires: %{python_module nose}
+BuildRequires: %{python_module pytest}
BuildRequires: python3-testsuite
%endif
BuildRequires: fdupes
@@ -43,6 +45,7 @@
%prep
%setup -q -n minidb-%{version}
+%patch0 -p1
%build
%python_build
@@ -53,7 +56,7 @@
%if %{with test}
%check
-%python_expand nosetests-%{$python_bin_suffix}
+%pytest test/test_minidb.py
%endif
%files %{python_files}
++ 0001-switch-to-pytest.patch ++
>From ac709c48385583a0309ff850cd31896d5f19f647 Mon Sep 17 00:00:00 2001
From: Paolo Stivanin
Date: Fri, 27 Mar 2020 14:47:48 +0100
Subject: [PATCH] switch to pytest
---
test/test_minidb.py | 227 ++--
1 file changed, 115 insertions(+), 112 deletions(-)
diff --git a/test/test_minidb.py b/test/test_minidb.py
index 8f6d44a..632aeec 100644
--- a/test/test_minidb.py
+++ b/test/test_minidb.py
@@ -1,8 +1,11 @@
import minidb
+import pytest
+import datetime
-from nose.tools import *
-import datetime
+def ported_eq(a, b, msg=None):
+if not a == b:
+raise AssertionError(msg or "%r != %r" % (a, b))
class FieldTest(minidb.Model):
@@ -138,38 +141,38 @@ def test_loading_objects():
assert field_test._private1 == 997
-@raises(minidb.UnknownClass)
def test_saving_without_registration_fails():
-with minidb.Store(debug=True) as db:
-FieldTest(9).save(db)
+with pytest.raises(minidb.UnknownClass):
+with minidb.Store(debug=True) as db:
+FieldTest(9).save(db)
-@raises(TypeError)
def test_registering_non_subclass_of_model_fails():
# This cannot be registered, as it's not a subclass of minidb.Model
-class Something(object):
-column = str
+with pytest.raises(TypeError):
+class Something(object):
+column = str
-with minidb.Store(debug=True) as db:
-db.register(Something)
-db.register(Something)
+with minidb.Store(debug=True) as db:
+db.register(Something)
+db.register(Something)
-@raises(KeyError)
def test_invalid_keyword_arguments_fails():
-with minidb.Store(debug=True) as db:
-db.register(FieldTest)
-FieldTest(9, this_is_not_an_attribute=123).save(db)
+with pytest.raises(KeyError):
+with minidb.Store(debug=True) as db:
+db.register(FieldTest)
+FieldTest(9, this_is_not_an_attribute=123).save(db)
-@raises(AttributeError)
def test_invalid_column_raises_attribute_error():
-class HasOnlyColumnX(minidb.Model):
-x = int
+with pytest.raises(AttributeError):
+class HasOnlyColumnX(minidb.Model):
+x = int
-with minidb.Store(debug=True) as db:
-