[Checkins] SVN: gocept.selenium/trunk/ - `scripts` extra no longer requires `elementtree` on Python >= 2.5.

Michael Howitz cvs-admin at zope.org
Thu Mar 15 19:21:00 UTC 2012


Log message for revision 124619:
  - `scripts` extra no longer requires `elementtree` on Python >= 2.5.
  - fixed test html for `converthtmltests` to be valid XTHML
  

Changed:
  U   gocept.selenium/trunk/CHANGES.txt
  U   gocept.selenium/trunk/setup.py
  U   gocept.selenium/trunk/src/gocept/selenium/scripts/converthtmltests.py
  U   gocept.selenium/trunk/src/gocept/selenium/scripts/tests/nocommands.html
  U   gocept.selenium/trunk/src/gocept/selenium/scripts/tests/notitle.html
  U   gocept.selenium/trunk/src/gocept/selenium/scripts/tests/plone3login.html

-=-
Modified: gocept.selenium/trunk/CHANGES.txt
===================================================================
--- gocept.selenium/trunk/CHANGES.txt	2012-03-15 15:38:45 UTC (rev 124618)
+++ gocept.selenium/trunk/CHANGES.txt	2012-03-15 19:20:56 UTC (rev 124619)
@@ -6,7 +6,9 @@
 
 - Updated URL of bug tracker.
 
+- `scripts` extra no longer requires `elementtree` on Python >= 2.5.
 
+
 0.13 (2012-01-30)
 -----------------
 

Modified: gocept.selenium/trunk/setup.py
===================================================================
--- gocept.selenium/trunk/setup.py	2012-03-15 15:38:45 UTC (rev 124618)
+++ gocept.selenium/trunk/setup.py	2012-03-15 19:20:56 UTC (rev 124619)
@@ -16,6 +16,14 @@
 from setuptools import setup, find_packages
 
 
+script_requirements = []
+try:
+    import xml.etree
+except ImportError:
+    # Python < 2.5
+    script_requirements.append('elementtree')
+
+
 setup(
     name='gocept.selenium',
     version='0.14dev',
@@ -80,9 +88,7 @@
             'PILwoTK',
             'plone.app.testing',
             ],
-        script=[
-            'elementtree',
-            ],
+        script=script_requirements,
         test_script=[
             'mock',
             ],

Modified: gocept.selenium/trunk/src/gocept/selenium/scripts/converthtmltests.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/scripts/converthtmltests.py	2012-03-15 15:38:45 UTC (rev 124618)
+++ gocept.selenium/trunk/src/gocept/selenium/scripts/converthtmltests.py	2012-03-15 19:20:56 UTC (rev 124619)
@@ -6,10 +6,15 @@
 import re
 import os
 import glob
-from elementtree import HTMLTreeBuilder
 from string import Template
 from optparse import OptionParser
+try:
+    from xml.etree import ElementTree as HTMLTreeBuilder
+except ImportError:
+    # Python < 2.5
+    from elementtree import HTMLTreeBuilder
 
+
 module_template = Template('''\
 import unittest
 

Modified: gocept.selenium/trunk/src/gocept/selenium/scripts/tests/nocommands.html
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/scripts/tests/nocommands.html	2012-03-15 15:38:45 UTC (rev 124618)
+++ gocept.selenium/trunk/src/gocept/selenium/scripts/tests/nocommands.html	2012-03-15 19:20:56 UTC (rev 124619)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title>nocommands</title>
 </head>
 <body>

Modified: gocept.selenium/trunk/src/gocept/selenium/scripts/tests/notitle.html
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/scripts/tests/notitle.html	2012-03-15 15:38:45 UTC (rev 124618)
+++ gocept.selenium/trunk/src/gocept/selenium/scripts/tests/notitle.html	2012-03-15 19:20:56 UTC (rev 124619)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 </head>
 <body>
 <table cellpadding="1" cellspacing="1" border="1">

Modified: gocept.selenium/trunk/src/gocept/selenium/scripts/tests/plone3login.html
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/scripts/tests/plone3login.html	2012-03-15 15:38:45 UTC (rev 124618)
+++ gocept.selenium/trunk/src/gocept/selenium/scripts/tests/plone3login.html	2012-03-15 19:20:56 UTC (rev 124619)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title>plone3login</title>
 </head>
 <body>



More information about the checkins mailing list