15
0

- Add compatibility-click-8.patch to fix compatiblity with

click 8 (gh#click-contrib/click-default-group#18).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-click-default-group?expand=0&rev=3
This commit is contained in:
2021-08-11 10:58:24 +00:00
committed by Git OBS Bridge
parent 89aac9aed5
commit dcffd773c9
3 changed files with 38 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
From 9415c77d05cf7d16876e7d70a49a41a6189983b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= <dev@schuetz-co.de>
Date: Sun, 20 Jun 2021 16:11:42 +0200
Subject: [PATCH] make tests compatible with click 8
It now outputs "No such option".
---
test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test.py b/test.py
index c464620..f90b80d 100644
--- a/test.py
+++ b/test.py
@@ -30,7 +30,7 @@ def bar():
def test_default_command_with_arguments():
assert r.invoke(cli, ['--foo', 'foooo']).output == 'foooo\n'
- assert 'no such option' in r.invoke(cli, ['-x']).output
+ assert 'no such option' in r.invoke(cli, ['-x']).output.lower()
def test_group_arguments():

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 11 10:57:36 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Add compatibility-click-8.patch to fix compatiblity with
click 8 (gh#click-contrib/click-default-group#18).
-------------------------------------------------------------------
Sun Aug 23 17:02:56 UTC 2020 - John Vandenberg <jayvdb@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-click-default-group
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,8 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
@@ -21,11 +22,14 @@ Version: 1.2.2
Release: 0
License: BSD-3-Clause
Summary: Extends clickGroup to invoke a command without explicit subcommand name
Url: https://github.com/sublee/click-default-group/
URL: https://github.com/sublee/click-default-group/
Group: Development/Languages/Python
Source: https://github.com/click-contrib/click-default-group/archive/v%{version}.tar.gz#/click-default-group-%{version}.tar.gz
BuildRequires: python-rpm-macros
# PATCH-FIX-UPSTREAM compatibility-click-8.patch gh#click-contrib/click-default-group#18 mcepl@suse.com
# Make tests compatible with click 8
Patch0: compatibility-click-8.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module click}
BuildRequires: %{python_module pytest}
@@ -40,7 +44,7 @@ BuildArch: noarch
Extends click.Group to invoke a command without explicit subcommand name.
%prep
%setup -q -n click-default-group-%{version}
%autosetup -p1 -n click-default-group-%{version}
%build
%python_build