From a52efe9b6a4df321349a7a00efecbf173336baaa4c483673283b5dddc2f76619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 2 Dec 2019 08:04:49 +0000 Subject: [PATCH] - Fix up all the dependencies and enable testing - Add patch disabling one test that is specific to windows only: * disable-windows-test.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tasklib?expand=0&rev=2 --- disable-windows-test.patch | 24 ++++++++++++++++++++++++ python-tasklib.changes | 7 +++++++ python-tasklib.spec | 14 +++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 disable-windows-test.patch diff --git a/disable-windows-test.patch b/disable-windows-test.patch new file mode 100644 index 0000000..901a659 --- /dev/null +++ b/disable-windows-test.patch @@ -0,0 +1,24 @@ +Index: tasklib-1.3.0/tasklib/tests.py +=================================================================== +--- tasklib-1.3.0.orig/tasklib/tests.py ++++ tasklib-1.3.0/tasklib/tests.py +@@ -64,19 +64,6 @@ class TasklibTest(unittest.TestCase): + shutil.rmtree(self.tmp) + + +-class TaskWarriorTest(TasklibTest): +- +- def test_custom_command(self): +- # ensure that a custom command which contains multiple parts +- # is properly split up +- tw = self.get_taskwarrior( +- task_command='wsl task', +- # prevent `_get_version` from running as `wsl` may not exist +- version_override=os.getenv('TASK_VERSION'), +- ) +- self.assertEqual(tw._get_task_command(), ['wsl', 'task']) +- +- + class TaskFilterTest(TasklibTest): + + def test_all_empty(self): diff --git a/python-tasklib.changes b/python-tasklib.changes index 7cb0ac3..fcaba60 100644 --- a/python-tasklib.changes +++ b/python-tasklib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 2 07:59:19 UTC 2019 - Tomáš Chvátal + +- Fix up all the dependencies and enable testing +- Add patch disabling one test that is specific to windows only: + * disable-windows-test.patch + ------------------------------------------------------------------- Tue Nov 26 04:07:01 UTC 2019 - Martin Herkt <9+suse@cirno.systems> diff --git a/python-tasklib.spec b/python-tasklib.spec index 033b1e2..52f0681 100644 --- a/python-tasklib.spec +++ b/python-tasklib.spec @@ -25,10 +25,17 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/robgolding63/tasklib Source: https://files.pythonhosted.org/packages/source/t/tasklib/tasklib-%{version}.tar.gz -BuildRequires: %{python_module devel} +Patch0: disable-windows-test.patch +BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six >= 1.4} +BuildRequires: %{python_module tzlocal} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: taskwarrior >= 2.1.0 +Requires: python-pytz +Requires: python-six >= 1.4 +Requires: python-tzlocal Requires: taskwarrior >= 2.1.0 BuildArch: noarch %python_subpackages @@ -39,6 +46,7 @@ databases, using a queryset API similar to that of Django's ORM. %prep %setup -q -n tasklib-%{version} +%patch0 -p1 %build %python_build @@ -47,6 +55,10 @@ databases, using a queryset API similar to that of Django's ORM. %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%check +export LANG="en_US.UTF8" +%python_exec -m unittest discover -v + %files %{python_files} %license LICENSE %doc README.rst