Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-taskw for openSUSE:Factory checked in at 2024-08-28 21:30:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-taskw (Old) and /work/SRC/openSUSE:Factory/.python-taskw.new.2698 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-taskw" Wed Aug 28 21:30:34 2024 rev:6 rq:1196378 version:2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-taskw/python-taskw.changes 2022-09-14 13:44:58.145892285 +0200 +++ /work/SRC/openSUSE:Factory/.python-taskw.new.2698/python-taskw.changes 2024-08-28 21:31:08.357882045 +0200 @@ -1,0 +2,8 @@ +Wed Aug 28 03:47:09 UTC 2024 - Steve Kowalik <steven.kowa...@suse.com> + +- Add patch support-pytest-8.patch: + * Support pytest 8. +- Switch to autosetup and pyproject macros. +- No more greedy globs in %files. + +------------------------------------------------------------------- New: ---- support-pytest-8.patch BETA DEBUG BEGIN: New: - Add patch support-pytest-8.patch: * Support pytest 8. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-taskw.spec ++++++ --- /var/tmp/diff_new_pack.EzPM5O/_old 2024-08-28 21:31:09.229918360 +0200 +++ /var/tmp/diff_new_pack.EzPM5O/_new 2024-08-28 21:31:09.233918527 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-taskw # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,16 +16,18 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-taskw Version: 2.0.0 Release: 0 Summary: Python bindings for taskwarrior License: GPL-3.0-or-later -Group: Development/Languages/Python URL: https://github.com/ralphbean/taskw Source: https://files.pythonhosted.org/packages/source/t/taskw/taskw-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#ralphbean/taskw#169 +Patch0: support-pytest-8.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-kitchen @@ -46,20 +48,21 @@ Python bindings for your taskwarrior database. %prep -%setup -q -n taskw-%{version} +%autosetup -p1 -n taskw-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pytest +%pytest -k 'not test_filtering_brace' %files %{python_files} %doc README.rst %license LICENSE.txt -%{python_sitelib}/* +%{python_sitelib}/taskw +%{python_sitelib}/taskw-%{version}.dist-info ++++++ support-pytest-8.patch ++++++ >From 6d5af74c29261035c95caec1c18002b2cd6195b7 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof <jspri...@debian.org> Date: Thu, 28 Mar 2024 08:17:39 +0100 Subject: [PATCH] Fix tests with new pytest Use unittest.TestCase and __test__ to ignore test base class. --- taskw/test/test_datas.py | 8 ++++++-- taskw/test/test_recursive.py | 5 +++-- taskw/test/test_utils.py | 5 +++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/taskw/test/test_datas.py b/taskw/test/test_datas.py index 1a3667c..21b4441 100644 --- a/taskw/test/test_datas.py +++ b/taskw/test/test_datas.py @@ -6,6 +6,7 @@ import pytest +from unittest import TestCase from taskw import TaskWarriorDirect, TaskWarriorShellout @@ -16,8 +17,9 @@ 'uuid': "c1c431ea-f0dc-4683-9a20-e64fcfa65fd1"} -class _BaseTestDB(object): - def setup(self): +class _BaseTestDB(TestCase): + __test__ = False + def setUp(self): # Sometimes the 'task' command line tool is not installed. if self.should_skip(): @@ -330,6 +332,7 @@ def test_load_tasks_with_one_each(self): class TestDBDirect(_BaseTestDB): + __test__ = True class_to_test = TaskWarriorDirect def test_delete_completed(self): @@ -345,6 +348,7 @@ def should_skip(self): class TestDBShellout(_BaseTestDB): + __test__ = True class_to_test = TaskWarriorShellout def should_skip(self): diff --git a/taskw/test/test_recursive.py b/taskw/test/test_recursive.py index 1ab99e1..88519b2 100644 --- a/taskw/test/test_recursive.py +++ b/taskw/test/test_recursive.py @@ -4,6 +4,7 @@ import pytest +from unittest import TestCase from taskw import TaskWarriorShellout @@ -14,8 +15,8 @@ 'uuid': "c1c431ea-f0dc-4683-9a20-e64fcfa65fd1"} -class TestRecursibe(object): - def setup(self): +class TestRecursibe(TestCase): + def setUp(self): if not TaskWarriorShellout.can_use(): # Sometimes the 'task' command line tool is not installed. pytest.skip("taskwarrior not installed") diff --git a/taskw/test/test_utils.py b/taskw/test/test_utils.py index c57dd38..8c6c1df 100644 --- a/taskw/test/test_utils.py +++ b/taskw/test/test_utils.py @@ -4,6 +4,7 @@ import dateutil.tz import pytz +from unittest import TestCase from taskw.utils import ( convert_dict_to_override_args, decode_task, @@ -31,7 +32,7 @@ def shuffled(l): return new -class TestUtils(object): +class TestUtils(TestCase): def test_no_side_effects(self): orig = TASK.copy() @@ -187,7 +188,7 @@ def test_convert_dict_to_override_args(self): assert set(actual_overrides) == set(expected_overrides) -class TestCleanExecArg(object): +class TestCleanExecArg(TestCase): def test_clean_null(self): assert b"" == clean_ctrl_chars(b"\x00")