[python-py] Minor testsuite fixes.

Thomas Moschny thm at fedoraproject.org
Mon Oct 22 16:19:42 UTC 2012


commit adb73172c1fdf9e455c4c5c23236af0cbed685fe
Author: Thomas Moschny <thm at fedoraproject.org>
Date:   Mon Oct 22 11:50:49 2012 +0200

    Minor testsuite fixes.

 py-1.4.10-fix-test_svnauth.patch |   15 +++++++++++++++
 python-py.spec                   |    7 +++++++
 2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/py-1.4.10-fix-test_svnauth.patch b/py-1.4.10-fix-test_svnauth.patch
new file mode 100644
index 0000000..14fc175
--- /dev/null
+++ b/py-1.4.10-fix-test_svnauth.patch
@@ -0,0 +1,15 @@
+diff -r 4532fe5ee826808805b373e9296d2baf4db254d9 -r 1060ea1c96dd9dfb031bd1987ceb2bf437a096a3 testing/path/test_svnauth.py
+--- a/testing/path/test_svnauth.py	Fri Oct 19 11:00:30 2012 +0200
++++ b/testing/path/test_svnauth.py	Sun Oct 21 20:37:54 2012 +0200
+@@ -261,7 +261,10 @@
+         u.propget('foo')
+         assert '--username="foo" --password="bar"' in u.commands[0]
+ 
+-class pytest_funcarg__setup:
++def pytest_funcarg__setup(request):
++    return Setup(request)
++
++class Setup:
+     def __init__(self, request):
+         if not svnbin:
+             py.test.skip("svn binary required")
diff --git a/python-py.spec b/python-py.spec
index 5818e18..1090dd6 100644
--- a/python-py.spec
+++ b/python-py.spec
@@ -22,6 +22,7 @@ License:        MIT and Public Domain
 #               main package: MIT, except: doc/style.css: Public Domain
 URL:            http://codespeak.net/py/dist/
 Source:         http://pypi.python.org/packages/source/p/py/py-%{version}.zip
+Patch0:         py-1.4.10-fix-test_svnauth.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  python-devel
@@ -78,6 +79,7 @@ following tools and modules:
 
 %prep
 %setup -q -n py-%{version}
+%patch0 -p1
 
 # remove shebangs and fix permissions
 find -type f -a \( -name '*.py' -o -name 'py.*' \) \
@@ -123,9 +125,13 @@ rm -rf doc/_build/html/.buildinfo
 
 %check
 %if 0%{?run_check}
+PYTHONPATH=%{buildroot}%{python_sitelib} \
+LC_ALL="en_US.UTF-8" \
 py.test -r s
 %if 0%{?with_python3}
 pushd %{py3dir}
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
+LC_ALL="en_US.UTF-8" \
 py.test-%{python3_version} -r s
 popd
 %endif # with_python3
@@ -158,6 +164,7 @@ rm -rf %{buildroot}
 %changelog
 * Sun Oct 21 2012 Thomas Moschny <thomas.moschny at gmx.de> - 1.4.10-2
 - Re-enable doc building and testsuite.
+- Minor testsuite fixes.
 
 * Sun Oct 21 2012 Thomas Moschny <thomas.moschny at gmx.de> - 1.4.10-1
 - Update to 1.4.10.


More information about the scm-commits mailing list