Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit246cc17

Browse files
committed
Use names directly on other tests
The tests are written broadly (per the style elsewhere in this testsuite), but narrowing the message-checking tests in this specificway has the further advantage that the logic of the code under testwill be less reflected in the logic of the tests, so that bugs areless likely to be missed by being duplicated across code and tests.
1 parent3fe2f15 commit246cc17

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎test/deprecation/test_toplevel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ def test_private_module_alias_access() -> None:
141141

142142
assertlen(messages)==len(_PRIVATE_MODULE_ALIAS_TARGETS)
143143

144-
fortarget,messageinzip(_PRIVATE_MODULE_ALIAS_TARGETS,messages):
145-
assertmessage.endswith(f"Use{target.__name__} instead.")
144+
forfullname,messageinzip(_PRIVATE_MODULE_ALIAS_TARGET_NAMES,messages):
145+
assertmessage.endswith(f"Use{fullname} instead.")
146146

147147

148148
deftest_private_module_alias_import()->None:
@@ -177,8 +177,8 @@ def test_private_module_alias_import() -> None:
177177

178178
assertlen(messages)==len(_PRIVATE_MODULE_ALIAS_TARGETS)
179179

180-
fortarget,messageinzip(_PRIVATE_MODULE_ALIAS_TARGETS,messages):
181-
assertmessage.endswith(f"Use{target.__name__} instead.")
180+
forfullname,messageinzip(_PRIVATE_MODULE_ALIAS_TARGET_NAMES,messages):
181+
assertmessage.endswith(f"Use{fullname} instead.")
182182

183183

184184
deftest_dir_contains_public_attributes()->None:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp