Skip to content

Commit 79e2d40

Browse files
committed
Add test to make sure that bindings don't shadow builtins until reached
1 parent 17c3b80 commit 79e2d40

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: tests/test_ssort.py

+15
Original file line numberDiff line numberDiff line change
@@ -557,3 +557,18 @@ def test_ssort_preserve_crlf_endlines_str():
557557

558558
actual = ssort(original)
559559
assert actual == expected
560+
561+
562+
def test_shadow_builtin():
563+
original = _clean(
564+
"""
565+
print("Hello, World!")
566+
567+
def print(message):
568+
pass
569+
"""
570+
)
571+
expected = original
572+
573+
actual = ssort(original)
574+
assert actual == expected

0 commit comments

Comments
 (0)