From 1901daa764c6f427a801f5c6595fd66a59fbbce8430aa11e853c53c770b0bfce Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 18 Oct 2017 08:50:34 +0000 Subject: [PATCH] Accepting request 533036 from devel:languages:python Required by python-django-nose See request 531880 : https://build.opensuse.org/request/show/531880 OBS-URL: https://build.opensuse.org/request/show/533036 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-django?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + pytest-django-3.1.2.tar.gz | 3 + python-pytest-django-dependency.patch | 11 ++++ python-pytest-django.changes | 86 +++++++++++++++++++++++++++ python-pytest-django.spec | 69 +++++++++++++++++++++ 6 files changed, 193 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pytest-django-3.1.2.tar.gz create mode 100644 python-pytest-django-dependency.patch create mode 100644 python-pytest-django.changes create mode 100644 python-pytest-django.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pytest-django-3.1.2.tar.gz b/pytest-django-3.1.2.tar.gz new file mode 100644 index 0000000..4857d01 --- /dev/null +++ b/pytest-django-3.1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:038ccc5a9daa1b1b0eb739ab7dce54e495811eca5ea3af4815a2a3ac45152309 +size 60225 diff --git a/python-pytest-django-dependency.patch b/python-pytest-django-dependency.patch new file mode 100644 index 0000000..0e21488 --- /dev/null +++ b/python-pytest-django-dependency.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -28,7 +28,7 @@ + license='BSD-3-Clause', + packages=['pytest_django'], + long_description=read('README.rst'), +- setup_requires=['setuptools_scm==1.11.1'], ++ setup_requires=['setuptools_scm'], + install_requires=['pytest>=2.9'], + classifiers=['Development Status :: 5 - Production/Stable', + 'Framework :: Django', diff --git a/python-pytest-django.changes b/python-pytest-django.changes new file mode 100644 index 0000000..d46c909 --- /dev/null +++ b/python-pytest-django.changes @@ -0,0 +1,86 @@ +------------------------------------------------------------------- +Wed Aug 23 14:48:12 UTC 2017 - t.gruner@katodev.de + +- Change spec-file for multi-python build + +------------------------------------------------------------------- +Wed Feb 22 18:33:31 CET 2017 - sbrabec@suse.com + +- Relax fixed dependency on an old version of python-setuptools_scm + (python-pytest-django-dependency.patch, + suggested by michal@cihar.com). + +------------------------------------------------------------------- +Mon Dec 5 22:34:03 UTC 2016 - buschmann23@opensuse.org + +- Update to 3.1.2 + + Bug fixes + * Auto clearing of mail.outbox has been re-introduced to not break + functionality in 3.x.x release. This means that Compatibility + issues mentioned in the 3.1.0 release are no longer present. + +- Update to 3.1.1 + + Bug fixes + * Workaround –pdb interaction with Django TestCase. The issue + is caused by Django TestCase not implementing TestCase.debug() + properly but was brought to attention with recent changes in + pytest 3.0.2. + +- Update to 3.1.0 + + Features + * Added new function scoped fixture mailoutbox that gives access + to djangos mail.outbox. The will clean/empty the mail.outbox + to assure that no old mails are still in the outbox. + * If django.contrib.sites is in your INSTALLED_APPS, Site cache + will be cleared for each test to avoid hitting the cache and + cause wrong Site object to be returned by Site.objects.get_current(). + + Compatibility + * IMPORTANT: the internal autouse fixture _django_clear_outbox has + been removed. If you have relied on this to get an empty outbox + for your test, you should change tests to use the mailoutbox + fixture instead. See documentation of mailoutbox fixture for usage. + If you try to access mail.outbox directly, AssertionError will be raised. + +- Update to 3.0.0 + + Bug fixes + * Fix error when Django happens to be imported before + pytest-django runs. Thanks to Will Harris for the bug report. + + Features + * Added a new option --migrations to negate a default usage of + --nomigrations. + * The previously internal pytest-django fixture that handles + database creation and setup has been refactored, refined and + made a public API. + + Compoatibility + * Official for the pytest 3.0.0 (2.9.2 release should work too, + though). The documentation is updated to mention pytest instead + of py.test. + * Django versions 1.4, 1.5 and 1.6 is no longer supported. The + supported versions are now 1.7 and forward. Django master is + supported as of 2016-08-21. + * pytest-django no longer supports Python 2.6. + * Specifying the DJANGO_TEST_LIVE_SERVER_ADDRESS environment + variable is no longer supported. Use DJANGO_LIVE_TEST_SERVER_ADDRESS + instead. + * Ensuring accidental database access is now stricter than before. + Previously database access was prevented on the cursor level. To + be safer and prevent more cases, it is now prevented at the + connection level. If you previously had tests which interacted + with the databases without a database cursor, you will need to + mark them with the pytest.mark.django_db() marker or request + the db fixture. + * The previously undocumented internal fixtures _django_db_setup, + _django_cursor_wrapper have been removed in favour of the new + public fixtures. If you previously relied on these internal + fixtures, you must update your code. + +------------------------------------------------------------------- +Mon Nov 9 12:56:30 UTC 2015 - mcihar@suse.cz + +- Install license + +------------------------------------------------------------------- +Mon Nov 9 10:59:03 UTC 2015 - mcihar@suse.cz + +- Initial packaging + diff --git a/python-pytest-django.spec b/python-pytest-django.spec new file mode 100644 index 0000000..a275807 --- /dev/null +++ b/python-pytest-django.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-pytest-django +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-pytest-django +Version: 3.1.2 +Release: 0 +Summary: A Django plugin for py.test +License: BSD-3-Clause +Group: Development/Languages/Python +Url: http://pytest-django.readthedocs.org/ +Source: https://files.pythonhosted.org/packages/source/p/pytest-django/pytest-django-%{version}.tar.gz +Patch: python-pytest-django-dependency.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest >= 2.9.2} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%python_subpackages + +%description +pytest-django allows you to test your Django project/applications with the +`pytest testing tool. + +Running your test suite with pytest-django allows you to tap into the features +that are already present in pytest. Here are some advantages: + +* Manage test dependencies with pytest fixtures. +* Less boilerplate tests: no need to import unittest, create a subclass with methods. Write tests as regular functions. +* Database re-use: no need to re-create the test database for every test run. +* Run tests in multiple processes for increased speed (with the pytest-xdist plugin). +* Make use of other pytest plugins. +* Works with both worlds: Existing unittest-style TestCase's still work without any modifications. + +%prep +%setup -q -n pytest-django-%{version} +%patch -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%files %{python_files} +%defattr(-,root,root,-) +%doc LICENSE +%{python_sitelib}/* + +%changelog