Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 2642ccf

Browse files
committed
add failing test
The distutils build_sass command runs the Manifest.build() method, not the Manifest.build_one() method. The former does not honor the strip_extension option.
1 parent cca5f11 commit 2642ccf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

sasstests.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def replace_source_path(s, name):
635635
)
636636

637637

638-
def test_manifest_strip_extension(tmpdir):
638+
def test_manifest_build_one_strip_extension(tmpdir):
639639
src = tmpdir.join('test').ensure_dir()
640640
src.join('a.scss').write('a{b: c;}')
641641

@@ -645,6 +645,16 @@ def test_manifest_strip_extension(tmpdir):
645645
assert tmpdir.join('css/a.css').read() == 'a {\n b: c; }\n'
646646

647647

648+
def test_manifest_build_strip_extension(tmpdir):
649+
src = tmpdir.join('test').ensure_dir()
650+
src.join('x.scss').write('a{b: c;}')
651+
652+
m = Manifest(sass_path='test', css_path='css', strip_extension=True)
653+
m.build(package_dir=str(tmpdir))
654+
655+
assert tmpdir.join('css/x.css').read() == 'a {\n b: c; }\n'
656+
657+
648658
class WsgiTestCase(BaseTestCase):
649659

650660
@staticmethod

0 commit comments

Comments
 (0)