diff --git a/hot3d/data_loaders/tests/test_AriaDataProvider.py b/hot3d/data_loaders/tests/test_AriaDataProvider.py index cfe11dc..f0b62f5 100644 --- a/hot3d/data_loaders/tests/test_AriaDataProvider.py +++ b/hot3d/data_loaders/tests/test_AriaDataProvider.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import importlib.resources import os import unittest from pathlib import Path @@ -23,9 +24,9 @@ try: - from libfb.py import parutil - data_path = Path(parutil.get_file_path("test_data/", pkg=__package__)) + data_path = Path(str(importlib.resources.files(__package__).joinpath("test_data/"))) + except ImportError: data_path = Path(__file__).parent diff --git a/hot3d/data_loaders/tests/test_HandBox2dDataProvider.py b/hot3d/data_loaders/tests/test_HandBox2dDataProvider.py index 33d6f33..437e541 100644 --- a/hot3d/data_loaders/tests/test_HandBox2dDataProvider.py +++ b/hot3d/data_loaders/tests/test_HandBox2dDataProvider.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import importlib.resources import os import unittest from pathlib import Path @@ -22,9 +23,13 @@ try: - from libfb.py import parutil - data_path = Path(parutil.get_file_path("test_data/", pkg=__package__)) + data_path = Path( + importlib.resources.files(__package__).joinpath( + "test_data/", + ) + ) + except ImportError: data_path = Path(__file__).parent diff --git a/hot3d/data_loaders/tests/test_ObjectBox2dDataProvider.py b/hot3d/data_loaders/tests/test_ObjectBox2dDataProvider.py index 93a8a5e..ad81203 100644 --- a/hot3d/data_loaders/tests/test_ObjectBox2dDataProvider.py +++ b/hot3d/data_loaders/tests/test_ObjectBox2dDataProvider.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import importlib.resources import os import unittest from pathlib import Path @@ -22,9 +23,13 @@ try: - from libfb.py import parutil - data_path = Path(parutil.get_file_path("test_data/", pkg=__package__)) + data_path = Path( + importlib.resources.files(__package__).joinpath( + "test_data/", + ) + ) + except ImportError: data_path = Path(__file__).parent