Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion fixit/textutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def is_palindrome(text: str) -> bool:

def reverse_words(text: str) -> str:
"""Reverse the order of words in text."""
return " ".join(reversed(text.split(" ")))
return " ".join(reversed(text.split()))
1 change: 0 additions & 1 deletion tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def test_f_to_c():
def test_km_to_miles():
assert km_to_miles(10) == pytest.approx(6.21371, rel=1e-4)


def test_miles_to_km():
assert miles_to_km(1) == pytest.approx(1.609344)

Expand Down
1 change: 0 additions & 1 deletion tests/test_textutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ def test_palindrome_ignores_punctuation():
assert is_palindrome("A man, a plan, a canal: Panama")


@pytest.mark.xfail(reason="Known bug: extra spaces create empty words")
def test_reverse_words_extra_spaces():
assert reverse_words("hello world") == "world hello"
Loading