diff options
Diffstat (limited to 'tests/unit/javascript/stylesheet/test_stylesheet_js.py')
-rw-r--r-- | tests/unit/javascript/stylesheet/test_stylesheet_js.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/javascript/stylesheet/test_stylesheet_js.py b/tests/unit/javascript/stylesheet/test_stylesheet_js.py index 13ec85cd5..1eebe3b7f 100644 --- a/tests/unit/javascript/stylesheet/test_stylesheet_js.py +++ b/tests/unit/javascript/stylesheet/test_stylesheet_js.py @@ -19,7 +19,7 @@ """Tests for stylesheet.js.""" -import os +import pathlib import pytest QtWebEngineWidgets = pytest.importorskip("PyQt5.QtWebEngineWidgets") @@ -49,8 +49,8 @@ class StylesheetTester: def init_stylesheet(self, css_file="green.css"): """Initialize the stylesheet with a provided css file.""" - css_path = os.path.join(os.path.dirname(__file__), css_file) - self.config_stub.val.content.user_stylesheets = css_path + css_path = pathlib.Path(__file__).parent / css_file + self.config_stub.val.content.user_stylesheets = str(css_path) def set_css(self, css): """Set document style to `css` via stylesheet.js.""" |