From 9336cb3257c7a088b3af7fb1f68f7170e9f89b084464f7642b0f448c70576916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 16 Aug 2020 07:52:07 +0000 Subject: [PATCH] Accepting request 826972 from home:jayvdb:py-submit Activate test suite, replacing nose with pytest OBS-URL: https://build.opensuse.org/request/show/826972 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tweepy?expand=0&rev=24 --- python-tweepy.changes | 6 ++++++ python-tweepy.spec | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/python-tweepy.changes b/python-tweepy.changes index 5da44e6..13b3b50 100644 --- a/python-tweepy.changes +++ b/python-tweepy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Aug 16 06:23:21 UTC 2020 - John Vandenberg + +- Activate test suite, replacing nose with pytest +- Add %doc + ------------------------------------------------------------------- Mon Jul 22 11:56:47 UTC 2019 - Tomáš Chvátal diff --git a/python-tweepy.spec b/python-tweepy.spec index f90774a..4f14466 100644 --- a/python-tweepy.spec +++ b/python-tweepy.spec @@ -1,7 +1,7 @@ # # spec file for package python-tweepy # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,8 +27,8 @@ URL: https://github.com/tweepy/tweepy Source: https://github.com/tweepy/tweepy/archive/v%{version}.tar.gz BuildRequires: %{python_module PySocks >= 1.5.7} BuildRequires: %{python_module mock >= 1.0.1} -BuildRequires: %{python_module nose} BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests >= 2.11.1} BuildRequires: %{python_module requests-oauthlib >= 0.7.0} BuildRequires: %{python_module setuptools} @@ -49,6 +49,7 @@ API, and streaming API. %prep %setup -q -n tweepy-%{version} +sed -i 's/from nose import SkipTest/from unittest import SkipTest/' tests/test_api.py %build %python_build @@ -58,10 +59,12 @@ API, and streaming API. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# Sadly tests need access to twitter api -#%%python_expand nosetests-%{$python_bin_suffix} -v tests.test_cursors tests.test_api tests.test_utils +export USE_REPLAY=1 +# TweepyAuthTests, test_filter_track, test_sample, test_sitestream, test_userstream and test_exp_backoff fail due to network +%pytest -rs -k 'not (TweepyAuthTests or test_filter_track or test_sample or test_sitestream or test_userstream or test_exp_backoff)' %files %{python_files} +%doc README.md CHANGELOG.md docs/*.rst %license LICENSE %{python_sitelib}/*