Revision: 594 http://rpy.svn.sourceforge.net/rpy/?rev=594&view=rev Author: lgautier Date: 2008-07-25 21:36:56 +0000 (Fri, 25 Jul 2008)
Log Message: ----------- - Added testItems - Fixed testCall (no longer passes tests... an explicit call to "dict" on **kwargs seems to be a "feature" of Python :/ ) Modified Paths: -------------- branches/rpy_nextgen/rpy/rlike/tests/test_container.py Modified: branches/rpy_nextgen/rpy/rlike/tests/test_container.py =================================================================== --- branches/rpy_nextgen/rpy/rlike/tests/test_container.py 2008-07-24 19:30:38 UTC (rev 593) +++ branches/rpy_nextgen/rpy/rlike/tests/test_container.py 2008-07-25 21:36:56 UTC (rev 594) @@ -65,16 +65,25 @@ def f(**kwargs): return [k for k in kwargs] - - x = rlc.ArgsDict() - x['a'] = 3 - x['b'] = 2 - x['c'] = 1 - + + args = (('a', 5), ('b', 4), ('c', 3), + ('d', 2), ('e', 1)) + x = rlc.ArgsDict(args) k = f(**x) - for ki, ko in itertools.izip(x, k): - self.assertTrue(ki, ko) + for ki, ko in itertools.izip(args, k): + self.assertEquals(ki[0], ko) + def testItems(self): + + args = (('a', 5), ('b', 4), ('c', 3), + ('d', 2), ('e', 1)) + x = rlc.ArgsDict(args) + it = x.items() + for ki, ko in itertools.izip(args, it): + self.assertEquals(ki[0], ko[0]) + self.assertEquals(ki[1], ko[1]) + + def suite(): suite = unittest.TestLoader().loadTestsFromTestCase(ArgsDictTestCase) return suite This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list