Skip to content

Commit ab6f510

Browse files
committed
account for other environments
Signed-off-by: Kyle Sayers <[email protected]>
1 parent 355ad0c commit ab6f510

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/llmcompressor/pipelines/sequential/ast_utils.py/test_auto_wrapper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,17 +198,17 @@ def test_walrus():
198198

199199
source = """
200200
def forward():
201-
if (asdf := (1 + 2)):
201+
if (x := (1 + 2)):
202202
pass
203203
"""
204204
output = """
205205
@torch.fx.wrap
206206
def wrapped_0():
207-
if (asdf := (1 + 2)):
207+
if (x := (1 + 2)):
208208
pass
209-
return (asdf,)
209+
return (x,)
210210
211211
def forward():
212-
(asdf,) = wrapped_0()
212+
(x,) = wrapped_0() # skip: some envs use "(x,)" -> "x,"
213213
"""
214214
check_wrapping(source, output)

0 commit comments

Comments
 (0)