Re: [Python-Dev] Contents of test_bool
On Wed, Mar 21, 2007 at 03:37:02PM -0500, Collin Winter wrote: > Is there any reason for test_bool to contain assertions like these? > > self.assertIs({}.has_key(1), False) > self.assertIs({1:1}.has_key(1), True) > > A significant portion of the file is devoted to making sure various > things return bools (isinstance, operator.*) or handle bools correctly > (pickle, marshal). Since these don't test the functionality of the > bool type, is there a reason not to move these tests to more > appropriate test files (eg, test_pickle) or removing them altogether > (if they duplicate existing tests)? > > I've started on this somewhat, but I thought I'd ask before I spent > too much time on it. Most of them could be moved to their specific type's test module. There are a few (at least on the py3k branch) tests that check if __bool__ functions really return bools and that the proper exceptions are raised. Those should stay in test_bool.py -Jack ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Contents of test_bool
I think it was just expedient to group these together when the bool type was added. I wouldn't lose sleep over it either way. On 3/21/07, Collin Winter <[EMAIL PROTECTED]> wrote: > Is there any reason for test_bool to contain assertions like these? > > self.assertIs({}.has_key(1), False) > self.assertIs({1:1}.has_key(1), True) > > A significant portion of the file is devoted to making sure various > things return bools (isinstance, operator.*) or handle bools correctly > (pickle, marshal). Since these don't test the functionality of the > bool type, is there a reason not to move these tests to more > appropriate test files (eg, test_pickle) or removing them altogether > (if they duplicate existing tests)? > > I've started on this somewhat, but I thought I'd ask before I spent > too much time on it. > > Collin Winter > ___ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Contents of test_bool
Is there any reason for test_bool to contain assertions like these? self.assertIs({}.has_key(1), False) self.assertIs({1:1}.has_key(1), True) A significant portion of the file is devoted to making sure various things return bools (isinstance, operator.*) or handle bools correctly (pickle, marshal). Since these don't test the functionality of the bool type, is there a reason not to move these tests to more appropriate test files (eg, test_pickle) or removing them altogether (if they duplicate existing tests)? I've started on this somewhat, but I thought I'd ask before I spent too much time on it. Collin Winter ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com