From b4ce442249ad1164ef6c7fdbccd90c49e64eda8a Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Thu, 5 Sep 2024 19:37:32 +0200 Subject: [PATCH] import package data for test file --- mailcom/test/test_inout.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mailcom/test/test_inout.py b/mailcom/test/test_inout.py index 61fc553..727c94f 100644 --- a/mailcom/test/test_inout.py +++ b/mailcom/test/test_inout.py @@ -1,9 +1,11 @@ from mailcom.inout import list_of_files, get_text, get_html_text import pytest from pathlib import Path +from importlib import resources +pkg = resources.files("mailcom") -FILE_PATH = Path("mailcom/test/data/Bonjour Agathe.eml") +FILE_PATH = Path(pkg / "test" / "data" / "Bonjour Agathe.eml") TEXT_REF = "J'espère que tu vas bien!" def test_list_of_files_found(tmp_path):