Skip to content

Commit 83072ef

Browse files
authored
Update test_optimizations.py
1 parent 6ea992c commit 83072ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_optimizations.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ def test_remove_docstrings(opts):
3333

3434
def test_single_line_mode(opts):
3535
opts["single_line_mode"].set(True)
36+
opts["remove_blank_lines"].set(True)
3637
text = "line1\nline2\nline3"
3738
result = apply_optimizations(opts, text)
3839
assert "⏎" in result
39-
assert "\n" not in result
40+
assert "\n" not in result.rstrip("\n")
41+
assert result.endswith("\n")
4042

4143

4244
def test_unicode_shortcuts(opts):
@@ -58,4 +60,4 @@ def test_boolean_replacement(opts):
5860
opts["replace_booleans"].set(True)
5961
text = "True and False or None"
6062
result = apply_optimizations(opts, text)
61-
assert result == "1 and 0 or ~"
63+
assert result == "1 and 0 or ~"

0 commit comments

Comments
 (0)