public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/trash-cli] pr6: Replace parameterized with built-in pytest functionality
Date: Sun, 20 Sep 2026 13:18:29 GMT [thread overview]
Message-ID: <178991030991.1.15630279650530028910.rpms-trash-cli-45658a7df1c5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/trash-cli
Branch : pr6
Commit : 45658a7df1c5915b59d47b96ad9c9e21a5b9e3d1
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2025-11-15T09:00:56+00:00
Stats : +110/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/trash-cli/c/45658a7df1c5915b59d47b96ad9c9e21a5b9e3d1?branch=pr6
Log:
Replace parameterized with built-in pytest functionality
---
diff --git a/trash-cli-0.24.5.26-no-parameterized.patch b/trash-cli-0.24.5.26-no-parameterized.patch
new file mode 100644
index 0000000..de69db8
--- /dev/null
+++ b/trash-cli-0.24.5.26-no-parameterized.patch
@@ -0,0 +1,106 @@
+diff -Naur trash-cli-0.24.5.26-original/requirements-dev.txt trash-cli-0.24.5.26/requirements-dev.txt
+--- trash-cli-0.24.5.26-original/requirements-dev.txt 2024-05-26 10:31:07.000000000 +0100
++++ trash-cli-0.24.5.26/requirements-dev.txt 2025-11-15 08:59:50.713467488 +0000
+@@ -2,7 +2,6 @@
+ pytest
+ mock
+ flexmock
+-parameterized
+ tox
+ PyYAML <= 5.4.1; python_version ~= '2.7'
+ PyYAML <= 5.2; python_version ~= '3.4'
+diff -Naur trash-cli-0.24.5.26-original/tests/test_put/components/test_original_location.py trash-cli-0.24.5.26/tests/test_put/components/test_original_location.py
+--- trash-cli-0.24.5.26-original/tests/test_put/components/test_original_location.py 2024-05-26 10:31:07.000000000 +0100
++++ trash-cli-0.24.5.26/tests/test_put/components/test_original_location.py 2025-11-15 08:59:50.713578031 +0000
+@@ -1,7 +1,6 @@
+ import os
+-import unittest
+
+-from parameterized import parameterized # type: ignore
++import pytest
+
+ from tests.support.put.fake_fs.fake_fs import FakeFs
+ from trashcli.put.core.path_maker_type import PathMakerType
+@@ -11,29 +10,34 @@
+ RelativePaths = PathMakerType.RelativePaths
+
+
+-class TestOriginalLocation(unittest.TestCase):
+-
+- def setUp(self):
+- self.original_location = OriginalLocation(FakeFsWithRealpath())
+-
+- @parameterized.expand([
+- ('/volume', '/file', AbsolutePaths, '/file',),
+- ('/volume', '/file/././', AbsolutePaths, '/file',),
+- ('/volume', '/dir/../file', AbsolutePaths, '/file'),
+- ('/volume', '/dir/../././file', AbsolutePaths, '/file'),
+- ('/volume', '/outside/file', AbsolutePaths, '/outside/file'),
+- ('/volume', '/volume/file', AbsolutePaths, '/volume/file',),
+- ('/volume', '/volume/dir/file', AbsolutePaths, '/volume/dir/file'),
+- ('/volume', '/file', RelativePaths, '/file'),
+- ('/volume', '/dir/../file', RelativePaths, '/file'),
+- ('/volume', '/outside/file', RelativePaths, '/outside/file'),
+- ('/volume', '/volume/file', RelativePaths, 'file'),
+- ('/volume', '/volume/dir/file', RelativePaths, 'dir/file'),
+- ])
++@pytest.fixture()
++def original_location():
++ yield OriginalLocation(FakeFsWithRealpath())
++
++
++class TestOriginalLocation:
++
++ @pytest.mark.parametrize(
++ "volume,file_to_be_trashed,path_type,expected_result",
++ [
++ ('/volume', '/file', AbsolutePaths, '/file',),
++ ('/volume', '/file/././', AbsolutePaths, '/file',),
++ ('/volume', '/dir/../file', AbsolutePaths, '/file'),
++ ('/volume', '/dir/../././file', AbsolutePaths, '/file'),
++ ('/volume', '/outside/file', AbsolutePaths, '/outside/file'),
++ ('/volume', '/volume/file', AbsolutePaths, '/volume/file',),
++ ('/volume', '/volume/dir/file', AbsolutePaths, '/volume/dir/file'),
++ ('/volume', '/file', RelativePaths, '/file'),
++ ('/volume', '/dir/../file', RelativePaths, '/file'),
++ ('/volume', '/outside/file', RelativePaths, '/outside/file'),
++ ('/volume', '/volume/file', RelativePaths, 'file'),
++ ('/volume', '/volume/dir/file', RelativePaths, 'dir/file'),
++ ]
++ )
+ def test_original_location(self, volume, file_to_be_trashed, path_type,
+- expected_result):
+- result = self.original_location.for_file(file_to_be_trashed, path_type,
+- volume)
++ expected_result, original_location):
++ result = original_location.for_file(file_to_be_trashed, path_type,
++ volume)
+ assert expected_result == result
+
+
+diff -Naur trash-cli-0.24.5.26-original/tests/test_support/test_help_reformatting/test_split_paragraphs.py trash-cli-0.24.5.26/tests/test_support/test_help_reformatting/test_split_paragraphs.py
+--- trash-cli-0.24.5.26-original/tests/test_support/test_help_reformatting/test_split_paragraphs.py 2024-05-26 10:31:07.000000000 +0100
++++ trash-cli-0.24.5.26/tests/test_support/test_help_reformatting/test_split_paragraphs.py 2025-11-15 08:59:50.713639281 +0000
+@@ -1,9 +1,9 @@
+-from parameterized import parameterized # type: ignore
++import pytest
+
+ from tests.support.help.help_reformatting import split_paragraphs
+
+
+-@parameterized.expand([
++@pytest.mark.parametrize("text,expected_result", [
+ ('one line', ['one line']),
+ ('one line\n', ['one line\n']),
+ ('one\ntwo\n', ['one\ntwo\n']),
+diff -Naur trash-cli-0.24.5.26-original/tox.ini trash-cli-0.24.5.26/tox.ini
+--- trash-cli-0.24.5.26-original/tox.ini 2024-05-26 10:31:07.000000000 +0100
++++ trash-cli-0.24.5.26/tox.ini 2025-11-15 08:59:50.713681281 +0000
+@@ -13,7 +13,6 @@
+ pytest
+ mock
+ flexmock
+- parameterized
+ # build testing
+ setuptools
+ commands =
diff --git a/trash-cli.spec b/trash-cli.spec
index 0a54ec8..889ca6c 100644
--- a/trash-cli.spec
+++ b/trash-cli.spec
@@ -6,6 +6,9 @@ License: GPL-2.0-or-later
URL : https://github.com/andreafrancia/trash-cli
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch1: virtualenv-versionlift.patch
+# Replace parameterized with built-in pytest functionality
+# https://github.com/andreafrancia/trash-cli/pull/373
+Patch2: trash-cli-0.24.5.26-no-parameterized.patch
BuildArch: noarch
BuildRequires: python3-devel
@@ -16,7 +19,7 @@ freedesktop.org compatible trash implementation. The command line interface is
compatible with rm and you can use trash-put as an alias to rm.
%prep
-%autosetup -n %{name}-%{version}
+%autosetup -n %{name}-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires -t
reply other threads:[~2026-09-20 13:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178991030991.1.15630279650530028910.rpms-trash-cli-45658a7df1c5@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox