[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate/tests - testDTML.py:1.10
Chris Withers
chrisw@nipltd.com
Wed, 6 Feb 2002 14:13:38 -0500
Update of /cvs-repository/Zope/lib/python/DocumentTemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv846
Modified Files:
testDTML.py
Log Message:
Fixed line ending problems causing test failure. Binary mode not appropriate as CVS checks otu with different line endings depending on the OS.
=== Zope/lib/python/DocumentTemplate/tests/testDTML.py 1.9 => 1.10 ===
def read_file(name):
- f = open(os.path.join(here, name), 'rb')
+ f = open(os.path.join(here, name), 'r')
res = f.read()
f.close()
return res
@@ -43,7 +43,6 @@
def d(**kw): return kw
-
class DTMLTests (unittest.TestCase):
doc_class = HTML
@@ -163,7 +162,7 @@
html=self.doc_class(read_file('dealers.dtml'))
res = html(inventory=items, first_ad=15)
expected = read_file('dealers.out')
- assert res == expected, res
+ self.assertEqual(res,expected)
def testSequenceSummaries(self):
def d(**kw): return kw