diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index fb7a016c9007f8..b5d75da7e5777f 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -26,10 +26,11 @@ def load_tests(loader, tests, ignore): tests.addTests(doctest.DocTestSuite(enum)) - if os.path.exists('Doc/library/enum.rst'): + if os.path.exists(f"{os.path.dirname(__file__)}/../../Doc/library/enum.rst"): tests.addTests(doctest.DocFileSuite( '../../Doc/library/enum.rst', optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, + module_relative=True )) return tests