[arch-commits] Commit in python-pytest-django/trunk (2 files)
Felix Yan
fyan at archlinux.org
Sat Sep 12 07:37:31 UTC 2015
Date: Saturday, September 12, 2015 @ 09:37:31
Author: fyan
Revision: 139956
upgpkg: python-pytest-django 2.8.0-2
add upstream patch for https://github.com/pytest-dev/pytest-django/issues/146
Added:
python-pytest-django/trunk/remove-assertion-in-django_settings_is_configured.patch
Modified:
python-pytest-django/trunk/PKGBUILD
---------------------------------------------------------+
PKGBUILD | 11 ++++-
remove-assertion-in-django_settings_is_configured.patch | 27 ++++++++++++++
2 files changed, 35 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-09-12 07:14:27 UTC (rev 139955)
+++ PKGBUILD 2015-09-12 07:37:31 UTC (rev 139956)
@@ -4,7 +4,7 @@
pkgbase=python-pytest-django
pkgname=('python-pytest-django' 'python2-pytest-django')
pkgver=2.8.0
-pkgrel=1
+pkgrel=2
pkgdesc="A Django plugin for py.test"
arch=('any')
license=('BSD')
@@ -12,10 +12,15 @@
makedepends=('python-pytest' 'python2-pytest' 'git')
checkdepends=('python-django' 'python2-django' 'python-pytest-xdist' 'python2-pytest-xdist'
'twine' 'python2-twine' 'python-south' 'python2-south')
-source=("git+https://github.com/pytest-dev/pytest-django.git#tag=v$pkgver")
-sha512sums=('SKIP')
+source=("git+https://github.com/pytest-dev/pytest-django.git#tag=v$pkgver"
+ remove-assertion-in-django_settings_is_configured.patch)
+sha512sums=('SKIP'
+ '3f94b06e83c31a949b0bee5ec9220d137ee4c594e4428f6b22f9e73bb2dbdeb6c2e92561343b940acfda4408b5dc756d3d4c5828818f3554bca644b9bdca9781')
prepare() {
+ # https://github.com/pytest-dev/pytest-django/issues/146
+ (cd pytest-django; patch -p1 -i ../remove-assertion-in-django_settings_is_configured.patch)
+
cp -a pytest-django{,-py2}
}
Added: remove-assertion-in-django_settings_is_configured.patch
===================================================================
--- remove-assertion-in-django_settings_is_configured.patch (rev 0)
+++ remove-assertion-in-django_settings_is_configured.patch 2015-09-12 07:37:31 UTC (rev 139956)
@@ -0,0 +1,27 @@
+From 963e04688a19e125b86ba026d3ef09e4afe17f69 Mon Sep 17 00:00:00 2001
+From: Daniel Hahler <git at thequod.de>
+Date: Mon, 2 Mar 2015 19:38:22 +0100
+Subject: [PATCH] Remove assertion in django_settings_is_configured
+
+django.conf.settings.configured is not necessarily True, in case DSM
+wasn't set during `pytest_load_initial_conftests`, but gets set in the
+project's conftest (via `pytest_configure`).
+
+Fixes https://github.com/pytest-dev/pytest-django/issues/146
+---
+ pytest_django/lazy_django.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/pytest_django/lazy_django.py b/pytest_django/lazy_django.py
+index 8458040..4ba4d5a 100644
+--- a/pytest_django/lazy_django.py
++++ b/pytest_django/lazy_django.py
+@@ -22,8 +22,6 @@ def django_settings_is_configured():
+
+ # If DJANGO_SETTINGS_MODULE is defined at this point, Django is assumed to
+ # always be loaded.
+- from django.conf import settings
+- assert settings.configured is True
+ return True
+
+
More information about the arch-commits
mailing list