joey: thuban/Extensions/wms/test test_parser.py,1.19,1.20
cvs@intevation.de
cvs at intevation.de
Mon Oct 4 19:01:04 CEST 2004
Author: joey
Update of /thubanrepository/thuban/Extensions/wms/test
In directory doto:/tmp/cvs-serv5380
Modified Files:
test_parser.py
Log Message:
Adding more tests to verify the test routine fails with non-equal arguments
Index: test_parser.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/test/test_parser.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- test_parser.py 4 Oct 2004 16:40:56 -0000 1.19
+++ test_parser.py 4 Oct 2004 17:01:02 -0000 1.20
@@ -112,13 +112,15 @@
# Equality of large permuted lists
self.compareLists([1,2,3,4,5,6,7,8], [8,3,1,2,5,7,4,6])
- # TODO: Check if non-equality raises an exception:
- #
- # [a,b] != [c,b,a]
- # [a,b] != [c,b]
- # [] = []
- # [] != [a]
+ # Non-Equality of different lists
+ self.assertRaises(AssertionError, self.compareLists, [1,2], [3,2])
+
+ # Non-Equality of different lists
+ self.assertRaises(AssertionError, self.compareLists, [1,2], [3,2,1])
+ # Non-Equality of empty and non-empty list
+ self.assertRaises(AssertionError, self.compareLists, [], [3,2,1])
+
def test_compareDicts(self):
"""
@@ -136,9 +138,13 @@
# Python may represent the dictionaries similar anyway
self.compareDicts({10:20, 11:30}, {11:30, 10:20})
- # TODO: Check if non-equality raises an exception:
- #
- # {a:b, b:c} != {a:b}
+ # Non-equality of different dictionaries
+ self.assertRaises(AssertionError, self.compareDicts, {10:20, 11:30},
+ {10:20, 11:30, 12:40})
+
+ # Non-equality of empty and non-empty dictionaries
+ self.assertRaises(AssertionError, self.compareDicts, {},
+ {10:20, 11:30, 12:40})
def test_general(self):
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)