Author: ianb
Date: 2008-04-23 00:53:03 -0600 (Wed, 23 Apr 2008)
New Revision: 3394
Removed:
FormEncode/trunk/tests/disabled_makeform.py
FormEncode/trunk/tests/test_formgen.py
Log:
removing tests for removed modules
Deleted: FormEncode/trunk/tests/disabled_makeform.py
===================================================================
--- FormEncode/trunk/tests/disabled_makeform.py 2008-04-23 06:22:12 UTC (rev 3393)
+++ FormEncode/trunk/tests/disabled_makeform.py 2008-04-23 06:53:03 UTC (rev 3394)
@@ -1,70 +0,0 @@
-# @@: Note, this is an experimental (TDD) test
-from sqlobject import *
-from formencode.formgen import makeform
-from formencode.fields import Context
-from formencode.doctest_xml_compare import xml_compare, make_xml
-from formencode import sqlformgen
-
-sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
-
-CONTEXT = Context()
-CONTEXT.secret = 'foo'
-
-def printer(s):
- print s
-
-def xcmp(a, b):
- try:
- a = '<xml>%s</xml>' % a
- xml_a = make_xml(a)
- except:
- print prxml(a)
- raise
- try:
- b = '<xml>%s</xml>' % b
- xml_b = make_xml(b)
- except:
- print prxml(b)
- raise
- prxml(a)
- prxml(b)
- assert xml_compare(xml_a, xml_b, reporter=printer)
-
-def prxml(xml):
- for lineno, line in enumerate(xml.splitlines()):
- print '%2i %s' % (lineno+1, line)
-
-class SimpleForm(SQLObject):
-
- name = StringCol()
- address = StringCol()
- city = StringCol()
-
-SimpleForm.createTable()
-
-def test_simple():
- f, v = makeform(SimpleForm, CONTEXT)
- yield (xcmp, f(requires_label=True).render(CONTEXT), """
- name: <input type="text" name="name" /> <br />
- address: <input type="text" name="address" /> <br />
- city: <input type="text" name="city" /> <br />
- """)
-
- f.name = 'simp'
-
- yield (xcmp, f(requires_label=True).render(CONTEXT), """
- name: <input type="text" name="simp.name" /> <br />
- address: <input type="text" name="simp.address" /> <br />
- city: <input type="text" name="simp.city" /> <br />
- """)
-
- # This test isn't really ready, so we'll skip
- return
- s = SimpleForm(name='Tom', address='123', city='Chicago')
- f, v = makeform(s, CONTEXT)
- yield (xcmp, f(requires_label=True).render(CONTEXT), """
- name: <input type="text" name="name" value="Tom" /> <br />
- address: <input type="text" name="address" value="123" /> <br />
- city: <input type="text" name="city" value="Chicago" /> <br />
- """)
-
Deleted: FormEncode/trunk/tests/test_formgen.py
===================================================================
--- FormEncode/trunk/tests/test_formgen.py 2008-04-23 06:22:12 UTC (rev 3393)
+++ FormEncode/trunk/tests/test_formgen.py 2008-04-23 06:53:03 UTC (rev 3394)
@@ -1,13 +0,0 @@
-try:
- import doctest
- doctest.OutputChecker
-except AttributeError:
- import formencode.util.doctest24 as doctest
-from formencode import formgen
-from formencode import doctest_xml_compare
-
-doctest_xml_compare.install()
-
-if __name__ == '__main__':
- doctest.testmod(formgen)
-
|