summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2016-08-13 17:35:25 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2016-08-13 17:35:25 +0200
commitb7a30d04427e4e4cbc66d08b780ffbb23ab44931 (patch)
treeb07f8dffd6e2945bc47a934740c0a284bedf3bde
parent631505f27c58a26f3d76fb8bd1508fff5bd35aa2 (diff)
downloadsqlparse-b7a30d04427e4e4cbc66d08b780ffbb23ab44931.tar.gz
Don't rely on line breaks in tests.
-rw-r--r--tests/conftest.py2
-rw-r--r--tests/test_regressions.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 38fe5c6..d107f5a 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -36,7 +36,7 @@ def load_file(filepath):
# Syntax is noisy and requires specific variable names
# And seems to be limited to only 1 argument.
with io.open(filepath(filename), encoding=encoding) as f:
- return f.read()
+ return f.read().strip()
return make_load_file
diff --git a/tests/test_regressions.py b/tests/test_regressions.py
index b0d66e1..e8e327b 100644
--- a/tests/test_regressions.py
+++ b/tests/test_regressions.py
@@ -179,7 +179,7 @@ def test_format_accepts_encoding(load_file):
# issue20
sql = load_file('test_cp1251.sql', 'cp1251')
formatted = sqlparse.format(sql, reindent=True, encoding='cp1251')
- tformatted = u'insert into foo\nvalues (1); -- Песня про надежду\n'
+ tformatted = u'insert into foo\nvalues (1); -- Песня про надежду'
assert formatted == tformatted