# HG changeset patch # User Thierry Florac # Date 1605700716 -3600 # Node ID aa51effb1d8a4fb54522633cd2b54365bd518557 # Parent 15edce13160b96dc289731c2dde69b93d7915169 Added package directory diff -r 15edce13160b -r aa51effb1d8a src/pyams_viewlet/tests/test_utilsdocstrings.py --- 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