Skip to content

Commit db2d749

Browse files
author
Andrey Fedoseev
committed
Another fix for tests
1 parent 0a5bf35 commit db2d749

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

static_precompiler/tests/test_management.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,16 @@ def test_compilestatic_command():
2121

2222
output_path = os.path.join(ROOT, OUTPUT_DIR)
2323

24-
tree = [(root[len(output_path):], sorted(dirs), sorted(files)) for root, dirs, files in os.walk(output_path)]
25-
26-
assert tree == [('', ['scripts', 'styles'], ['another_test.js', 'test-compass.css']),
27-
('/scripts', [], ['test.js']),
28-
('/styles', [], ['imported.css', 'test.css'])]
24+
compiled_files = []
25+
for root, dirs, files in os.walk(output_path):
26+
for filename in files:
27+
compiled_files.append(os.path.join(root[len(output_path):].lstrip("/"), filename))
28+
compiled_files.sort()
29+
30+
assert compiled_files == [
31+
'another_test.js',
32+
'scripts/test.js',
33+
'styles/imported.css',
34+
'styles/test.css',
35+
'test-compass.css',
36+
]

0 commit comments

Comments
 (0)