15
0

- Update to 0.2.0:

* Update tests to expect hyphens
  * Support for click 8 changes
  * Backwards compatibility between click 7 & 8 
- Drop included patch click-repl-pr53-hyphens.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-click-repl?expand=0&rev=4
This commit is contained in:
2021-06-21 08:52:21 +00:00
committed by Git OBS Bridge
parent 388cdb2fa0
commit 6e907ceab9
5 changed files with 14 additions and 57 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4fa153f37cb6fba8ef729aaa367cbe9c4c21f6cdc4b361dd3be074c84b084855
size 7044

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0cac32a625c24cd1414cc323e314a79278e2310e41596a6e27997e1c9f99e72
size 7014

View File

@@ -1,50 +0,0 @@
From 3b557bcb3b53f81950d50169329f4fd1171bc6be Mon Sep 17 00:00:00 2001
From: Chris Sullins <theazureshadow@gmail.com>
Date: Wed, 31 Oct 2018 17:32:27 -0700
Subject: [PATCH] Update tests to expect hyphens
Click now converts underscores to hyphens in command names, so
update test expectations to match.
---
tests/test_argument.py | 2 +-
tests/test_basic.py | 4 ++--
tests/test_command_collection.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/test_argument.py b/tests/test_argument.py
index ab1ccea..93af5d1 100644
--- a/tests/test_argument.py
+++ b/tests/test_argument.py
@@ -14,6 +14,6 @@ def arg_cmd():
pass
c = ClickCompleter(root_command)
- completions = list(c.get_completions(Document(u"arg_cmd ")))
+ completions = list(c.get_completions(Document(u"arg-cmd ")))
assert set(x.text for x in completions) == set([u"foo", u"bar"])
diff --git a/tests/test_basic.py b/tests/test_basic.py
index 9c67171..b198efb 100644
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -21,8 +21,8 @@ def second_level_command_two():
pass
c = ClickCompleter(root_command)
- completions = list(c.get_completions(Document(u"first_level_command ")))
+ completions = list(c.get_completions(Document(u"first-level-command ")))
assert set(x.text for x in completions) == set(
- [u"second_level_command_one", u"second_level_command_two"]
+ [u"second-level-command-one", u"second-level-command-two"]
)
diff --git a/tests/test_command_collection.py b/tests/test_command_collection.py
index 0e4c584..a78dfcf 100644
--- a/tests/test_command_collection.py
+++ b/tests/test_command_collection.py
@@ -24,4 +24,4 @@ def foobar_cmd():
c = ClickCompleter(click.CommandCollection(sources=[foo_group, foobar_group]))
completions = list(c.get_completions(Document(u"foo")))
- assert set(x.text for x in completions) == set([u"foo_cmd", u"foobar_cmd"])
+ assert set(x.text for x in completions) == set([u"foo-cmd", u"foobar-cmd"])

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Jun 21 08:51:19 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.2.0:
* Update tests to expect hyphens
* Support for click 8 changes
* Backwards compatibility between click 7 & 8
- Drop included patch click-repl-pr53-hyphens.patch
-------------------------------------------------------------------
Tue Oct 13 15:52:41 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-click-repl
#
# Copyright (c) 2020 SUSE LLC
# 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
@@ -18,15 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-click-repl
Version: 0.1.6
Version: 0.2.0
Release: 0
Summary: REPL plugin for Click
License: MIT
URL: https://github.com/untitaker/click-repl
# No tests in PyPI archive
Source: https://github.com/click-contrib/click-repl/archive/%{version}.tar.gz#/click-repl-%{version}-gh.tar.gz
# PATCH-FIX-UPSTREAM click-repl-pr53-hyphens.patch -- Update tests to expect hyphens
Patch0: https://github.com/click-contrib/click-repl/pull/53.patch#/click-repl-pr53-hyphens.patch
BuildRequires: %{python_module click}
BuildRequires: %{python_module prompt_toolkit}
BuildRequires: %{python_module pytest}