[pypy-dev] Re: [pypy-svn] rev 2354 - pypy/trunk/src/pypy/objspace/std/test
Michael Hudson
mwh at python.net
Tue Dec 16 12:37:37 CET 2003
alex at codespeak.net writes:
> Author: alex
> Date: Tue Dec 16 12:06:48 2003
> New Revision: 2354
>
> Modified:
> pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py
> Log:
> Added a test for dicts' str representation
>
>
> Modified: pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py
> ==============================================================================
> --- pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py (original)
> +++ pypy/trunk/src/pypy/objspace/std/test/test_dictobject.py Tue Dec 16 12:06:48 2003
> @@ -303,6 +303,12 @@
> self.assertEqual(bool, True)
> bool = d1 < d4
> self.assertEqual(bool, False)
> +
> + def test_str_repr(self):
> + self.assertEqual('{}', str({}))
> + self.assertEqual('{1: 2}', str({1: 2}))
> + self.assertEqual("{'ba': 'bo'}", str({'ba': 'bo'}))
> + self.assertEqual("{1: 2, 'ba': 'bo'}", str({1: 2, 'ba': 'bo'}))
Are these really good tests? They would seem to depend on hashtable
ordering...
Cheers,
mwh
--
I never realized it before, but having looked that over I'm certain
I'd rather have my eyes burned out by zombies with flaming dung
sticks than work on a conscientious Unicode regex engine.
-- Tim Peters, 3 Dec 1998
More information about the Pypy-dev
mailing list