From 0b074ae5559a0c69d57996d19f814e1c3f743d24 Mon Sep 17 00:00:00 2001 From: hpk Date: Sun, 1 Mar 2009 14:16:14 +0100 Subject: [PATCH] [svn r62288] better error handling --HG-- branch : trunk --- py/test/conftesthandle.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/test/conftesthandle.py b/py/test/conftesthandle.py index 4194e883b..7c172b5de 100644 --- a/py/test/conftesthandle.py +++ b/py/test/conftesthandle.py @@ -30,12 +30,16 @@ class Conftest(object): if anchor.check(): # we found some file object self._path2confmods[None] = self.getconftestmodules(anchor) break + else: + assert 0, "no root of filesystem?" def getconftestmodules(self, path): """ return a list of imported conftest modules for the given path. """ try: clist = self._path2confmods[path] except KeyError: + if path is None: + raise ValueError("missing default conftest.") dp = path.dirpath() if dp == path: return [self.importconftest(defaultconftestpath)]