From e2c129373d4bde20382f91d11e51c75702732a43 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sun, 7 Feb 2021 18:51:57 +0100 Subject: Switch from os.path to pathlib.Path, systematic test changes This patch does the systematic changes on all tests. Note that there was a bug in principle: os.path was used without importing os.path This worked through the way how the os module initializes itself, but you always will find the explicit import in the python library. But the problem is going away anyway after the transition to pathlib.Path :) Change-Id: I95144d7f9bb07a38376c3aa428df663f2e64bcb7 Reviewed-by: Cristian Maureira-Fredes --- sources/pyside6/tests/QtWidgets/qtoolbar_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sources/pyside6/tests/QtWidgets/qtoolbar_test.py') diff --git a/sources/pyside6/tests/QtWidgets/qtoolbar_test.py b/sources/pyside6/tests/QtWidgets/qtoolbar_test.py index 95ef3dc83..3e5ae7194 100644 --- a/sources/pyside6/tests/QtWidgets/qtoolbar_test.py +++ b/sources/pyside6/tests/QtWidgets/qtoolbar_test.py @@ -32,7 +32,8 @@ import os import sys import unittest -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from pathlib import Path +sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -- cgit v1.2.3