From e5e08067ebf06c2a7b4fb26a95a0b2a10a142370 Mon Sep 17 00:00:00 2001 From: weishan Date: Sat, 8 Jul 2023 14:35:44 +0800 Subject: [PATCH] test: set path --- tests/test_image_retrieval.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_image_retrieval.py b/tests/test_image_retrieval.py index 5ba9342..58d6cf7 100644 --- a/tests/test_image_retrieval.py +++ b/tests/test_image_retrieval.py @@ -1,11 +1,13 @@ from collections import namedtuple +import os from pathlib import Path import sys import pytest -sys.path.insert(0, "..") -from src.dinov2_retrieval.image_retriever import ImageRetriver +src_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "src") +sys.path.insert(0, src_dir) +from dinov2_retrieval.image_retriever import ImageRetriver def test_init():