diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-09-23 07:14:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-22 21:14:15 -0700 |
commit | 0d20fc7477a21328dd353071eaa06384bb818f7b (patch) | |
tree | 9b9c56e7656be87f5702c877de737f94602a10eb /Lib/test/test_asyncio/utils.py | |
parent | b10de68c6ceae1076cdc98c890b9802dc81a7f44 (diff) | |
download | cpython-0d20fc7477a21328dd353071eaa06384bb818f7b.tar.gz cpython-0d20fc7477a21328dd353071eaa06384bb818f7b.zip |
gh-109505: Remove unnecessary `hasattr` checks from `test_asyncio` (#109506)
Diffstat (limited to 'Lib/test/test_asyncio/utils.py')
-rw-r--r-- | Lib/test/test_asyncio/utils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 64eb4410bfb..1e5ab6eb935 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -37,10 +37,9 @@ from test.support import threading_helper def data_file(*filename): - if hasattr(support, 'TEST_HOME_DIR'): - fullname = os.path.join(support.TEST_HOME_DIR, *filename) - if os.path.isfile(fullname): - return fullname + fullname = os.path.join(support.TEST_HOME_DIR, *filename) + if os.path.isfile(fullname): + return fullname fullname = os.path.join(os.path.dirname(__file__), '..', *filename) if os.path.isfile(fullname): return fullname |