[Zope3-checkins] CVS: Zope3/src/zope/xmlpickle/tests -
test_xmlpickle.py:1.5.28.2
Fred L. Drake, Jr.
fred at zope.com
Thu Sep 11 18:20:40 EDT 2003
Update of /cvs-repository/Zope3/src/zope/xmlpickle/tests
In directory cvs.zope.org:/tmp/cvs-serv26655
Modified Files:
Tag: parentgeddon-branch
test_xmlpickle.py
Log Message:
make the tests portable to Python 2.2.x:
we can always read <true/> and <false/>, but we can't generate them in
2.2.x since True and False weren't a distinct type back then
=== Zope3/src/zope/xmlpickle/tests/test_xmlpickle.py 1.5.28.1 => 1.5.28.2 ===
--- Zope3/src/zope/xmlpickle/tests/test_xmlpickle.py:1.5.28.1 Thu Sep 11 16:55:30 2003
+++ Zope3/src/zope/xmlpickle/tests/test_xmlpickle.py Thu Sep 11 17:20:39 2003
@@ -97,16 +97,12 @@
)
def test_True(self):
- self.__test(True,
- '<?xml version="1.0" encoding="utf-8" ?>\n'
- '<pickle> <true/> </pickle>\n'
- )
+ self.__test(True)
+ self.assertEqual(loads('<pickle><true/></pickle>'), True)
def test_False(self):
- self.__test(False,
- '<?xml version="1.0" encoding="utf-8" ?>\n'
- '<pickle> <false/> </pickle>\n'
- )
+ self.__test(False)
+ self.assertEqual(loads('<pickle><false/></pickle>'), False)
def test_reduce(self):
v = DictSub()
More information about the Zope3-Checkins
mailing list