Skip to content

Commit 074bbc7

Browse files
committed
Tiny import tweak
1 parent b05963c commit 074bbc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/deprecation/test_attributes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Running pytest checks dynamic behavior as usual.
99
"""
1010

11-
from itertools import groupby
11+
import itertools
1212
from typing import Type
1313

1414
import pytest
@@ -145,6 +145,6 @@ def test_private_module_alias_import() -> None:
145145
# to do a pre-check prior to retrieving the attribute for actual use. However, for
146146
# each import, all messages should be the same and should note what to use instead.
147147
messages_with_duplicates = [str(w.message) for w in ctx]
148-
messages = [message for message, _ in groupby(messages_with_duplicates)]
148+
messages = [message for message, _ in itertools.groupby(messages_with_duplicates)]
149149
for target, message in zip(_MODULE_ALIAS_TARGETS, messages, strict=True):
150150
assert message.endswith(f"Use {target.__name__} instead.")

0 commit comments

Comments
 (0)