On 7/16/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > On 7/16/07, guido.van.rossum <[email protected]> wrote: > > Author: guido.van.rossum > > Date: Tue Jul 17 02:34:25 2007 > > New Revision: 56409 > > > > Modified: > > python/branches/py3k-struni/Lib/test/test_exceptions.py > > Log: > > Make the test of chr() overflow pass. > > (Sigh. There are so many redundant tests.) > > > > Yep. But is there any good way of dealing with the issue? Beyond > enforcing a more strict testing policy in terms of where certain tests > go to make sure redundancy is minimized, I can't think of any good > solution.
Perhaps we should first set a policy, and then move/remove tests that don't follow it. A strawman for a policy is that all behavior of a particular class or function should be tested in the test suite for that class / function. That would mean that if chr() is to raise a specific exception, it should be tested with the other tests for chr(), not with that exception. > -Brett --Guido > > > > Modified: python/branches/py3k-struni/Lib/test/test_exceptions.py > > ============================================================================== > > --- python/branches/py3k-struni/Lib/test/test_exceptions.py (original) > > +++ python/branches/py3k-struni/Lib/test/test_exceptions.py Tue Jul 17 > > 02:34:25 2007 > > @@ -99,7 +99,7 @@ > > except TypeError: pass > > > > self.raise_catch(ValueError, "ValueError") > > - self.assertRaises(ValueError, chr, sys.maxunicode+1) > > + self.assertRaises(ValueError, chr, 17<<16) > > > > self.raise_catch(ZeroDivisionError, "ZeroDivisionError") > > try: x = 1/0 > > _______________________________________________ > > Python-3000-checkins mailing list > > [email protected] > > http://mail.python.org/mailman/listinfo/python-3000-checkins > > > _______________________________________________ > Python-3000-checkins mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-3000-checkins > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000-checkins mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000-checkins
