From 0999a380f7eaa6bec64f94a4722b9daf440cbe37bb37ec75d2399d4dbac87fcf Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 18 Mar 2022 09:56:03 +0000 Subject: [PATCH] Accepting request 962494 from home:pgajdos:python - do not require python-mock for build OBS-URL: https://build.opensuse.org/request/show/962494 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=11 --- python-Delorean.changes | 5 +++++ python-Delorean.spec | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/python-Delorean.changes b/python-Delorean.changes index c956638..831bcf9 100644 --- a/python-Delorean.changes +++ b/python-Delorean.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 17 15:10:01 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build + ------------------------------------------------------------------- Tue Nov 5 09:52:06 UTC 2019 - Tomáš Chvátal diff --git a/python-Delorean.spec b/python-Delorean.spec index 78cad43..8d03f24 100644 --- a/python-Delorean.spec +++ b/python-Delorean.spec @@ -1,7 +1,7 @@ # # spec file for package python-Delorean # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,7 +36,7 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Babel >= 2.1.1} BuildRequires: %{python_module humanize >= 0.5.1} -BuildRequires: %{python_module mock} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil >= 2.4.2} BuildRequires: %{python_module pytz >= 2015.7} BuildRequires: %{python_module tzlocal >= 1.2} @@ -58,10 +58,9 @@ arise dealing with datetimes in Python. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%{python_expand export PYTHONDONTWRITEBYTECODE=1 -export PYTHONPATH=%{buildroot}%{$python_sitelib} -$python tests/delorean_tests.py -} +# https://github.com/myusuf3/delorean/issues/113 +sed -i 's:import mock:from unittest import mock:' tests/delorean_tests.py +%pytest tests/delorean_tests.py %files %{python_files} %doc CHANGES.rst README.rst