This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Use specific asserts in unicode tests
Type: enhancement Stage: resolved
Components: Tests, Unicode Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, ezio.melotti, lemburg, loewis, pitrou, serhiy.storchaka, vstinner
Priority: normal Keywords: easy, patch

Created on 2014-02-07 20:25 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_unicode_asserts.patch serhiy.storchaka, 2014-02-07 20:25 review
test_unicode_asserts_2.patch serhiy.storchaka, 2014-02-08 13:52 review
test_unicode_asserts_3.patch serhiy.storchaka, 2017-04-05 05:42 review
Pull Requests
URL Status Linked Edit
PR 787 closed serhiy.storchaka, 2017-03-23 17:06
Messages (4)
msg210541 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-02-07 20:25
The proposed patch makes unicode related tests use more specific asserts. This will provide more useful failure report.
msg210570 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-02-07 22:25
-                    self.assertTrue(type(result) is str, type(result))
+                    self.assertIs(type(result), str, type(result))

You can probably drop the third parameter.

Victor
msg210572 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-02-07 22:34
Indeed. Thanks.
msg210642 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-02-08 13:52
Removed redundant information from error messages in multibyte codec tests.
History
Date User Action Args
2022-04-11 14:57:58adminsetgithub: 64744
2017-04-05 05:42:13serhiy.storchakasetstatus: open -> closed
files: + test_unicode_asserts_3.patch
resolution: rejected
stage: patch review -> resolved
2017-03-23 17:06:04serhiy.storchakasetpull_requests: + pull_request692
2014-02-08 13:52:44serhiy.storchakasetfiles: + test_unicode_asserts_2.patch

messages: + msg210642
2014-02-07 22:34:03serhiy.storchakasetmessages: + msg210572
2014-02-07 22:25:43vstinnersetmessages: + msg210570
2014-02-07 20:29:32serhiy.storchakalinkissue16510 dependencies
2014-02-07 20:25:25serhiy.storchakacreate