diff options
author | Florian Bruhin <git@the-compiler.org> | 2014-12-12 17:45:59 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2014-12-12 17:45:59 +0100 |
commit | eceda53b3a03cc0f3986866596795efbd280ade1 (patch) | |
tree | 7d4926e31a33921633fead06a2633f5691a21d17 | |
parent | fc0428ef5fac8ea9506d2cfc17da4ea466a0165b (diff) | |
download | qutebrowser-eceda53b3a03cc0f3986866596795efbd280ade1.tar.gz qutebrowser-eceda53b3a03cc0f3986866596795efbd280ade1.zip |
Fix split tests.
-rw-r--r-- | qutebrowser/test/utils/test_split.py | 7 |
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.""" |