summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2014-12-12 17:45:59 +0100
committerFlorian Bruhin <git@the-compiler.org>2014-12-12 17:45:59 +0100
commiteceda53b3a03cc0f3986866596795efbd280ade1 (patch)
tree7d4926e31a33921633fead06a2633f5691a21d17
parentfc0428ef5fac8ea9506d2cfc17da4ea466a0165b (diff)
downloadqutebrowser-eceda53b3a03cc0f3986866596795efbd280ade1.tar.gz
qutebrowser-eceda53b3a03cc0f3986866596795efbd280ade1.zip
Fix split tests.
-rw-r--r--qutebrowser/test/utils/test_split.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/qutebrowser/test/utils/test_split.py b/qutebrowser/test/utils/test_split.py
index 161a484f7..6ed4a376d 100644
--- a/qutebrowser/test/utils/test_split.py
+++ b/qutebrowser/test/utils/test_split.py
@@ -149,19 +149,20 @@ class SimpleSplitTests(unittest.TestCase):
"""Test if the behaviour matches str.split."""
for test in self.TESTS:
with self.subTest(string=test):
- self.assertEqual(split.simple_split(test), test.split())
+ self.assertEqual(split.simple_split(test),
+ test.rstrip().split())
def test_str_split_maxsplit_1(self):
"""Test if the behaviour matches str.split with maxsplit=1."""
string = "foo bar baz"
self.assertEqual(split.simple_split(string, maxsplit=1),
- string.split(maxsplit=1))
+ string.rstrip().split(maxsplit=1))
def test_str_split_maxsplit_0(self):
"""Test if the behaviour matches str.split with maxsplit=0."""
string = " foo bar baz "
self.assertEqual(split.simple_split(string, maxsplit=0),
- string.split(maxsplit=0))
+ string.rstrip().split(maxsplit=0))
def test_split_keep(self):
"""Test splitting with keep=True."""