From 594ebde9dabbd0ce9723d3ef197b4d0826a13879 Mon Sep 17 00:00:00 2001 From: Marcin Kasperski Date: Thu, 14 Dec 2017 15:38:07 +0100 Subject: [PATCH] Fixes 1037. In some cases nose reports spurious errors about file not found (firing those during test import). See detailed analysis in https://github.com/nose-devs/nose/issues/1037 --- nose/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nose/importer.py b/nose/importer.py index e677658c..46ec633e 100644 --- a/nose/importer.py +++ b/nose/importer.py @@ -110,7 +110,7 @@ def _dirname_if_file(self, filename): if os.path.isdir(filename): return filename else: - return os.path.dirname(filename) + return os.path.dirname(os.path.abspath(filename)) def sameModule(self, mod, filename): mod_paths = []