[Checkins] SVN: z3c.pt/trunk/ Adjusted the bigtable benchmark test to API changes.

Hanno Schlichting plone at hannosch.info
Sat Nov 15 09:46:44 EST 2008


Log message for revision 92975:
  Adjusted the bigtable benchmark test to API changes.
  

Changed:
  U   z3c.pt/trunk/CHANGES.txt
  U   z3c.pt/trunk/benchmark/benchmark/bigtable.py

-=-
Modified: z3c.pt/trunk/CHANGES.txt
===================================================================
--- z3c.pt/trunk/CHANGES.txt	2008-11-15 14:33:13 UTC (rev 92974)
+++ z3c.pt/trunk/CHANGES.txt	2008-11-15 14:46:44 UTC (rev 92975)
@@ -4,6 +4,10 @@
 Head
 ~~~~
 
+  Bug fixes
+
+- Adjusted the bigtable benchmark test to API changes. [hannosch]
+
 Version 1.0b3 - November 12, 2008
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

Modified: z3c.pt/trunk/benchmark/benchmark/bigtable.py
===================================================================
--- z3c.pt/trunk/benchmark/benchmark/bigtable.py	2008-11-15 14:33:13 UTC (rev 92974)
+++ z3c.pt/trunk/benchmark/benchmark/bigtable.py	2008-11-15 14:46:44 UTC (rev 92975)
@@ -6,13 +6,11 @@
 import sys
 import timeit
 
-import zope.component.testing
-import zope.configuration.xmlconfig
-import zope.pagetemplate.pagetemplate
+from zope.pagetemplate import pagetemplate
 
-import z3c.pt
+from chameleon.zpt import template
 
-bigtable_z3c = z3c.pt.PageTemplate("""
+bigtable_z3c = template.PageTemplate("""
 <table xmlns="http://www.w3.org/1999/xhtml"
 xmlns:tal="http://xml.zope.org/namespaces/tal">
 <tr tal:repeat="row table">
@@ -20,7 +18,7 @@
 </td></tr></table>
 """)
 
-bigtable_zope = zope.pagetemplate.pagetemplate.PageTemplate()
+bigtable_zope = pagetemplate.PageTemplate()
 bigtable_zope.pt_edit("""\
 <table xmlns="http://www.w3.org/1999/xhtml"
 xmlns:tal="http://xml.zope.org/namespaces/tal">
@@ -33,9 +31,13 @@
          for x in range(1000)]
 
 def setup():
-    zope.component.testing.setUp()
-    zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
+    import z3c.pt
+    from zope.component.testing import setUp
+    from zope.configuration import xmlconfig
 
+    setUp()
+    xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
+
 def test_z3c():
     """z3c.pt template"""
     data = bigtable_z3c(table=table)



More information about the Checkins mailing list