[issue16510] Using appropriate checks in tests

2017-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed
Added file: http://bugs.python.org/file46779/tests_asserts_7.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2017-03-23 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2017-03-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +697

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2014-06-29 Thread Mark Lawrence

Mark Lawrence added the comment:

Can we follow up on this please as it's referenced from #9554 as well.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2014-02-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in bytes tests, Use specific asserts in 
collections tests, Use specific asserts in decimal tests, Use specific asserts 
in ipaddress tests

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2014-02-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in bigmem tests, Use specific asserts in 
int tests, Use specific asserts in mailbox, smtplib and poplib tests, Use 
specific asserts in operator tests, Use specific asserts in unicode tests, Use 
specific asserts in warnings and exceptions tests

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2014-02-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in argparse and optparse tests, Use 
specific asserts in io tests, Use specific asserts in threading tests, Use 
specific asserts in urllib related tests

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2014-02-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After chipping off yet some small separate issues, there are only 276 changed 
lines left in 80 files.

--
Added file: http://bugs.python.org/file33984/tests_asserts_4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-16 Thread Jason R. Coombs

Jason R. Coombs added the comment:

A third counterargument is:

3. Newer developers (and even seasoned ones) adding new tests may use existing 
tests as a model for best practices. If the existing tests model sub-optimal 
practices, then those practices will be perpetuated both in the codebase and in 
the minds of contributors.

Given that Serhiy has so diligently prepared and updated the patch, I'm 
inclined to say the codebase would be better off accepting the patch.

David, can you imagine a process by which a patch like this could be acceptable?

--
nosy: +jason.coombs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is synchronized to tip the patch which doesn't include patches for already 
separated children issues. It touches 129 files and modifies over 600 lines.

--
Added file: http://bugs.python.org/file32650/tests_asserts_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-16 Thread R. David Murray

R. David Murray added the comment:

Jason: yes, if it is broken down into small enough pieces for the module 
maintainer to be comfortable with the review :).  I approved Serhiy's separate 
patch for test_email.  I still wasn't sure about backporting, but I really 
don't like the 'unless' construct in test_email, so I decided to say OK.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in distutils tests, Use specific asserts in 
sqlite3 tests, Use specific asserts in test_decr, Use specific asserts in 
tkinter tests

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in array tests, Use specific asserts in 
datetime tests, Use specific asserts in http.cookiejar tests, Use specific 
asserts in weakref tests

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in test_asyncio

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in test_email

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Use specific asserts in ctype tests, Use specific asserts in 
importlib tests, Use specific asserts in lib2to3 tests, Use specific asserts in 
unittest tests

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think there are two counterargument to leaving things alone.

1. The reason for the specialized checks is to change behavior when the test 
fails, to give more informative error messages. So the change is not purely 
cosmetic or stylistic. I believe there was a recent case where assertTrue(a == 
b), a and b strings, had to be changed to assertEqual(a, b) to find out why the 
assert failed. As I remember, nothing else in the test file obviously needed 
changing and it would not have been touched otherwise.

2. People adding tests may not review existing tests for modernization.

That said, it *is* possible to ignore 2. and not worry about 1. until a test 
fails. And I agree that the original patch is too much to review.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-08-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated to sync with tip. It is 5% less than first version because some 
changes already applied in other commits.

--
Added file: http://bugs.python.org/file31505/tests_asserts_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-04-13 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-04-13 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe added the comment:

@David is that policy documented in the devguide? If not, should it be?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-04-13 Thread R. David Murray

R. David Murray added the comment:

If it isn't documented it should be, and you could open an issue for it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2012-11-23 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2012-11-21 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2012-11-19 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch upgrades tests to use specialized checks added in 3.1 and 
3.2 (assertIsNone(x) instead assertTrue(x is None), assertLess(a, b) instead 
assertTrue(a  b), etc).  This modern checks provide a more useful error 
message in case of a fail.

Replaced only those checks that are not related to the tested operators.  For 
example, assertTrue(a  b) preserved if the operator  is tested.

--
components: Tests
files: tests_asserts.patch
keywords: patch
messages: 175953
nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Using appropriate checks in tests
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28041/tests_asserts.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2012-11-19 Thread R. David Murray

R. David Murray added the comment:

Thanks for the work, but we don't generally make bulk changes like this.  It 
generates churn in the codebase, and has the risk of inadvertently changing the 
meaning of the tests, to little actual benefit.  Instead we modernize tests 
when we touch them for other reasons and are in a position to confirm that the 
changes do not change the meaning of the tests.  (I realize that for most of 
your changes the meaning is trivially preserved...but when you make a lot of 
changes you are almost certain to make some mistakes...thus the resistance to 
doing bulk updates.)

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2012-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I understand this.  I checked the patch few times, with long (more than a 
month) intervals between inspections.  If someone wants to modernize some 
tests, he can turn to this patch for reference.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16510
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com