Skip to content

Commit ba61a22

Browse files
committed
Fixed broken tests
1 parent c39ffb1 commit ba61a22

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

sass.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ PySass_compile(PyObject *self, PyObject *args, PyObject *kwds)
6363
image_path = PyDict_GetItemString(kwds, "image_path");
6464

6565
if (output_style == NULL || output_style == Py_None) {
66-
output_style_v = SASS_STYLE_EXPANDED;
66+
output_style_v = SASS_STYLE_NESTED;
6767
}
6868
else if (PyString_Check(output_style)) {
6969
item_size = PyString_Size(output_style);

sasstests.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ def compile_invalid_image_path():
6161

6262
@suite.test
6363
def compile_string():
64-
actual = sass.compile(string='a { b { color: blue; } }',
65-
output_style='compact')
66-
assert actual == 'a b{color: blue;}'
64+
actual = sass.compile(string='a { b { color: blue; } }')
65+
assert actual == 'a b {\n color: blue; }\n'
6766
with raises(TypeError):
6867
sass.compile(string=1234)
6968
with raises(TypeError):
@@ -72,8 +71,13 @@ def compile_string():
7271

7372
@suite.test
7473
def compile_filename():
75-
actual = sass.compile(filename='test/a.sass', output_style='compact')
76-
assert actual == 'a b{color: blue;}'
74+
actual = sass.compile(filename='test/a.sass')
75+
assert actual == '''\
76+
body {
77+
background-color: green; }
78+
body a {
79+
color: blue; }
80+
'''
7781
with raises(TypeError):
7882
sass.compile(filename=1234)
7983
with raises(TypeError):

0 commit comments

Comments
 (0)