Skip to content

Commit b7a30d0

Browse files
committed
Don't rely on line breaks in tests.
1 parent 631505f commit b7a30d0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/conftest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def make_load_file(filename, encoding='utf-8'):
3636
# Syntax is noisy and requires specific variable names
3737
# And seems to be limited to only 1 argument.
3838
with io.open(filepath(filename), encoding=encoding) as f:
39-
return f.read()
39+
return f.read().strip()
4040

4141
return make_load_file
4242

‎tests/test_regressions.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def test_format_accepts_encoding(load_file):
179179
# issue20
180180
sql = load_file('test_cp1251.sql', 'cp1251')
181181
formatted = sqlparse.format(sql, reindent=True, encoding='cp1251')
182-
tformatted = u'insert into foo\nvalues (1); -- Песня про надежду\n'
182+
tformatted = u'insert into foo\nvalues (1); -- Песня про надежду'
183183

184184
assert formatted == tformatted
185185

0 commit comments

Comments
 (0)