Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add "end" test in cpython
add "end" test in cpython
  • Loading branch information
Sungmin-Joo committed Sep 27, 2019
commit 0d6c264509c9ccbffee385acd46bde7ce80cd635
6 changes: 6 additions & 0 deletions builtin/tests/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ def gen2():
ok = True
assert ok, "TypeError not raised"

try:
print("hello","gpython", end="123\n")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print("hello","gpython", end="123\n")
print("hello", "gpython", end="123\n")

except TypeError as e:
ok = True
assert ok, "TypeError not raised"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert ok, "TypeError not raised"
assert ok, "TypeError not raised when 'sep' is not in the kwargs dict"

that said, I am not sure I understand this test.
do we really want this line to raise an exception? why?


try:
print("hello", sep=" ", end=1)
except TypeError as e:
Expand Down