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

Commit7a4f7eb

Browse files
committed
Fix zip calls
This omits strict=True, which is only supported in Python 3.10 andlater, and instead explicitly asserts that the arguments are thesame length (which is arguably better for its explicitness anyway).
1 parent1f290f1 commit7a4f7eb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎test/deprecation/test_attributes.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ def test_private_module_alias_access() -> None:
120120

121121
# Each should have warned exactly once, and note what to use instead.
122122
messages= [str(w.message)forwinctx]
123-
fortarget,messageinzip(_PRIVATE_MODULE_ALIAS_TARGETS,messages,strict=True):
123+
124+
assertlen(messages)==len(_PRIVATE_MODULE_ALIAS_TARGETS)
125+
126+
fortarget,messageinzip(_PRIVATE_MODULE_ALIAS_TARGETS,messages):
124127
assertmessage.endswith(f"Use{target.__name__} instead.")
125128

126129

@@ -153,5 +156,8 @@ def test_private_module_alias_import() -> None:
153156
# each import, all messages should be the same and should note what to use instead.
154157
messages_with_duplicates= [str(w.message)forwinctx]
155158
messages= [messageformessage,_initertools.groupby(messages_with_duplicates)]
156-
fortarget,messageinzip(_PRIVATE_MODULE_ALIAS_TARGETS,messages,strict=True):
159+
160+
assertlen(messages)==len(_PRIVATE_MODULE_ALIAS_TARGETS)
161+
162+
fortarget,messageinzip(_PRIVATE_MODULE_ALIAS_TARGETS,messages):
157163
assertmessage.endswith(f"Use{target.__name__} instead.")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp