diff options
author | Christian Tismer <[email protected]> | 2021-02-07 18:51:57 +0100 |
---|---|---|
committer | Christian Tismer <[email protected]> | 2021-02-08 14:21:41 +0100 |
commit | e2c129373d4bde20382f91d11e51c75702732a43 (patch) | |
tree | 056cfca0341542cba3c6f578429b3c3cced235da /sources/pyside6/tests/QtCharts/qcharts_test.py | |
parent | 95e3b2c7256c71b274be5f16e216116e5876ee87 (diff) |
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 <[email protected]>
Diffstat (limited to 'sources/pyside6/tests/QtCharts/qcharts_test.py')
-rw-r--r-- | sources/pyside6/tests/QtCharts/qcharts_test.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtCharts/qcharts_test.py b/sources/pyside6/tests/QtCharts/qcharts_test.py index 7ce355f75..c3e1ce805 100644 --- a/sources/pyside6/tests/QtCharts/qcharts_test.py +++ b/sources/pyside6/tests/QtCharts/qcharts_test.py @@ -34,7 +34,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) |