[TurboGears2] Patch out the chameleon.genshi tests
Luke Macken
lmacken at fedoraproject.org
Wed Dec 14 19:39:54 UTC 2011
commit 0616fc8a453da258c4fec7eb1d70fbb8dd7ed6b8
Author: Luke Macken <lmacken at redhat.com>
Date: Wed Dec 14 14:38:51 2011 -0500
Patch out the chameleon.genshi tests
TurboGears2-no-chameleon.patch | 80 ++++++++++++++++++++++++++++++++++++++++
TurboGears2.spec | 5 ++-
2 files changed, 84 insertions(+), 1 deletions(-)
---
diff --git a/TurboGears2-no-chameleon.patch b/TurboGears2-no-chameleon.patch
new file mode 100644
index 0000000..27ec09f
--- /dev/null
+++ b/TurboGears2-no-chameleon.patch
@@ -0,0 +1,80 @@
+diff -up ./tests/test_configuration.py.orig ./tests/test_configuration.py
+--- ./tests/test_configuration.py.orig 2011-12-14 14:23:02.695929669 -0500
++++ ./tests/test_configuration.py 2011-12-14 14:23:07.036941896 -0500
+@@ -98,10 +98,6 @@ class TestAppConfig:
+ def test_setup_sa_auth_backend(self):
+ self.config.setup_sa_auth_backend()
+
+- def test_setup_chameleon_genshi_renderer(self):
+- self.config.paths.templates = 'template_path'
+- self.config.setup_chameleon_genshi_renderer()
+-
+ def test_setup_genshi_renderer(self):
+ self.config.paths.templates = 'template_path'
+ self.config.setup_genshi_renderer()
+diff -up ./tests/test_stack/__init__.py.orig ./tests/test_stack/__init__.py
+--- ./tests/test_stack/__init__.py.orig 2011-12-14 14:23:33.518017884 -0500
++++ ./tests/test_stack/__init__.py 2011-12-14 14:23:44.810051011 -0500
+@@ -12,7 +12,7 @@ class TestConfig(AppConfig):
+ values = {}
+ AppConfig.__init__(self)
+ #First we setup some base values that we know will work
+- self.renderers = ['genshi', 'mako', 'chameleon_genshi', 'jinja','json']
++ self.renderers = ['genshi', 'mako', 'jinja','json']
+ self.render_functions = tg.util.Bunch()
+ self.package = tests.test_stack
+ self.default_renderer = 'genshi'
+diff -up ./tests/test_stack/rendering/test_dotted_rendering.py.orig ./tests/test_stack/rendering/test_dotted_rendering.py
+--- ./tests/test_stack/rendering/test_dotted_rendering.py.orig 2011-12-14 14:22:47.881888440 -0500
++++ ./tests/test_stack/rendering/test_dotted_rendering.py 2011-12-14 14:22:51.137897436 -0500
+@@ -15,12 +15,6 @@ def setup_noDB():
+ )
+ return app_from_config(base_config)
+
+-def test_default_chameleon_genshi_renderer():
+- app = setup_noDB()
+- resp = app.get('/chameleon_index_dotted')
+- assert "Welcome" in resp, resp
+- assert "TurboGears" in resp, resp
+-
+ #def test_default_kajiki_renderer():
+ # app = setup_noDB()
+ # resp = app.get('/kajiki_index_dotted')
+diff -up ./tests/test_stack/rendering/test_rendering.py.orig ./tests/test_stack/rendering/test_rendering.py
+--- ./tests/test_stack/rendering/test_rendering.py.orig 2011-12-14 14:22:34.263851224 -0500
++++ ./tests/test_stack/rendering/test_rendering.py 2011-12-14 14:22:42.533873747 -0500
+@@ -122,34 +122,6 @@ def test_genshi_sub_inheritance_from_bot
+ assert "from sub-template: sub.frombottom" in resp
+ assert "Master template" in resp
+
+-def test_chameleon_genshi_base():
+- app = setup_noDB()
+- resp = app.get('/chameleon_genshi_index')
+- assert ("<p>TurboGears 2 is rapid web application development toolkit"
+- " designed to make your life easier.</p>") in resp
+-
+-def test_chameleon_genshi_inheritance():
+- try:
+- import lxml
+- except ImportError:
+- # match templates need lxml, but since they don're really work anyway
+- # (at least not fully compatible with Genshi), we just skip this test
+- return
+- app = setup_noDB()
+- try:
+- resp = app.get('/chameleon_genshi_inherits')
+- except NameError, e:
+- # known issue with chameleon.genshi 1.0
+- if 'match_templates' not in str(e):
+- raise
+- except AttributeError, e:
+- # known issue with chameleon.genshi 1.3
+- if 'XPathResult' not in str(e):
+- raise
+- else:
+- assert "Inheritance template" in resp
+- assert "Master template" in resp
+-
+ def _test_jinja_inherits():
+ app = setup_noDB()
+ resp = app.get('/jinja_inherits')
diff --git a/TurboGears2.spec b/TurboGears2.spec
index 8ecd54d..83cdb89 100644
--- a/TurboGears2.spec
+++ b/TurboGears2.spec
@@ -12,6 +12,7 @@ URL: http://www.turbogears.org
Source0: http://www.turbogears.org/2.1/downloads/%{version}/%{name}-%{version}.tar.gz
Source1: test-templates.tar.bz2
Patch0: %{name}-kajiki.patch
+Patch1: %{name}-no-chameleon.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -24,7 +25,7 @@ BuildRequires: python-jinja2
BuildRequires: python-simplegeneric
BuildRequires: python-repoze-who-friendlyform >= 1.0.4
BuildRequires: python-repoze-who
-BuildRequires: python-chameleon < 2.0
+#BuildRequires: python-chameleon < 2.0
BuildRequires: python-repoze-tm2 >= 1.0-0.4.a4
BuildRequires: python-tw-forms
BuildRequires: python-genshi
@@ -73,6 +74,7 @@ database development and everything in between:
%prep
%setup -q
%patch0 -p1 -b .kajiki
+%patch1 -p1 -b .chameleon
%build
@@ -108,6 +110,7 @@ rm -rf %{buildroot}
- Update to 2.1.4
- Get the test suite up and running again
- Add a tarball with some missing templates needed to run the tests
+- Patch out the chameleon.genshi tests
* Thu Aug 25 2011 Luke Macken <lmacken at redhat.com> - 2.1.2-1
- Update to 2.1.2
More information about the scm-commits
mailing list