Closed as not planned
Description
It is better to not import from one test in other tests, I propose adding a utils
module for common types / helpers.
Originally posted by @sobolevn in #111624 (comment)
For example:
cpython/Lib/test/test_complex.py
Lines 446 to 450 in 93206d1
and
cpython/Lib/test/test_capi/test_getargs.py
Lines 102 to 104 in 93206d1
cpython/Lib/test/test_capi/test_getargs.py
Lines 113 to 123 in 93206d1
we could unify to:
class FloatLike:
def __init__(self, value):
self.value = value
def __float__(self):
return self.value
Such support classes now scattered e.g. in Lib/test_float.py
and in Lib/test_capi/test_getargs.py
.