Skip to content

Commit 2a9b7d2

Browse files
committed
Preprocess: Don't depend on current working directory in tests
1 parent 05510e1 commit 2a9b7d2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_preprocess_cssless.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121

2222
class TestPreprocessHtmlMergeCss(unittest.TestCase):
2323
def test_preprocess_html_merge_css(self):
24-
src_path = 'tests/preprocess_cssless_data/multiset.html'
25-
dst_path = 'tests/preprocess_cssless_data/multiset_out.html'
26-
expected_path = 'tests/preprocess_cssless_data/multiset_expected.html'
24+
dir_path = os.path.dirname(__file__)
25+
src_path = os.path.join(dir_path, 'preprocess_cssless_data/multiset.html')
26+
dst_path = os.path.join(dir_path, 'preprocess_cssless_data/multiset_out.html')
27+
expected_path = os.path.join(dir_path, 'preprocess_cssless_data/multiset_expected.html')
2728

2829
preprocess_html_merge_css(src_path, dst_path)
30+
2931
with open(dst_path, 'r') as a_file:
3032
test = a_file.read()
3133

0 commit comments

Comments
 (0)