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: Clean up tests that return a value that isn't None
Type: enhancement Stage: resolved
Components: Tests Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: andrei.avk, kj, lukasz.langa, miss-islington
Priority: normal Keywords: patch

Created on 2021-08-22 18:07 by andrei.avk, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27898 merged andrei.avk, 2021-08-22 19:16
PR 27913 merged miss-islington, 2021-08-23 18:50
PR 27914 merged miss-islington, 2021-08-23 18:51
Messages (4)
msg400083 - (view) Author: Andrei Kulakov (andrei.avk) * (Python triager) Date: 2021-08-22 18:07
In #41322 the behavior of returning a value!=None from test methods was deprecated, there are currently a few tests in Python that do that; it would be good to fix them to be consistent with our deprecation requirement and to avoid deprecation warnings in test runs; it may also possibly surface unexpected issues when reviewing these tests.

- there are two distutils tests - test_quiet and test_no_optimize_flag -- probably not worth it to investigate them as distutils is set for removal in 3.12

- test_null_strings in CAPI

- test_constructor in test_code

I'll try to fix the two tests above today.
msg400163 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-08-23 18:50
New changeset 27b761a11a14521617a01257eb3767150bec3a74 by andrei kulakov in branch 'main':
bpo-44980: fix test_constructor to return None value (GH-27898)
https://github.com/python/cpython/commit/27b761a11a14521617a01257eb3767150bec3a74
msg400167 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-08-23 19:20
New changeset de49eacee85dbd56bfa261200604766ca6042d66 by Miss Islington (bot) in branch '3.9':
bpo-44980: fix test_constructor to return None value (GH-27898) (GH-27914)
https://github.com/python/cpython/commit/de49eacee85dbd56bfa261200604766ca6042d66
msg400168 - (view) Author: miss-islington (miss-islington) Date: 2021-08-23 19:21
New changeset 10955353ce25a52741e8f72fdbb6f4b150ee4dc7 by Miss Islington (bot) in branch '3.10':
bpo-44980: fix test_constructor to return None value (GH-27898)
https://github.com/python/cpython/commit/10955353ce25a52741e8f72fdbb6f4b150ee4dc7
History
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89143
2021-09-03 00:20:31andrei.avksetstatus: open -> closed

nosy: + kj
resolution: fixed
type: enhancement
stage: patch review -> resolved
2021-08-23 19:21:10miss-islingtonsetmessages: + msg400168
2021-08-23 19:20:32lukasz.langasetmessages: + msg400167
2021-08-23 18:51:00miss-islingtonsetpull_requests: + pull_request26370
2021-08-23 18:50:55miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26369
2021-08-23 18:50:55lukasz.langasetnosy: + lukasz.langa
messages: + msg400163
2021-08-22 20:42:14lukasz.langasettitle: Clean up a few tests that return a value!=None -> Clean up tests that return a value that isn't None
2021-08-22 19:16:59andrei.avksetkeywords: + patch
stage: patch review
pull_requests: + pull_request26353
2021-08-22 18:07:45andrei.avkcreate