--- a/src/pyams_viewlet/tests/test_utilsdocstrings.py Wed Dec 04 11:21:29 2019 +0100
+++ b/src/pyams_viewlet/tests/test_utilsdocstrings.py Wed Nov 18 12:58:36 2020 +0100
@@ -16,9 +16,10 @@
import doctest
import os
-import sys
import unittest
+from pyams_viewlet.tests import get_package_dir
+
__docformat__ = 'restructuredtext'
@@ -34,9 +35,7 @@
flags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE |
doctest.REPORT_ONLY_FIRST_FAILURE)
- package_dir = os.path.split(test_dir)[0]
- if package_dir not in sys.path:
- sys.path.append(package_dir)
+ package_dir = get_package_dir(test_dir)
# filtering files on extension
docs = [doc for doc in