def _test_file(self, test): addr = test.address() err = RuntimeError("test.address does not contain a valid file: %s" % (addr, )) if not addr: raise err file_path = addr[0] if not os.path.exists(file_path): raise err return file_util.relative(file_util.source(file_path))
def _test_file(self, test): addr = test.address() err = RuntimeError("test.address does not contain a valid file: %s" % (addr,)) if not addr: raise err file_path = addr[0] if not os.path.exists(file_path): raise err return file_util.relative(file_util.source(file_path))
def wantFile(self, filename): try: rel_file = file_util.relative(filename) except FileOutsideCurrentRoot: log.warning("ignoring file outside current root: %s" % (filename,)) return False debug("want file %s? %s" % (filename, "NO" if (rel_file not in self.files_to_run) else "if you like...")) if rel_file not in self.files_to_run: return False return None # do nose's default behaviour
def wantFile(self, filename): try: rel_file = file_util.relative(filename) except FileOutsideCurrentRoot: warning("ignoring file outside current root: %s" % (filename, )) return False debug("want file %s? %s" % (rel_file, "NO" if (rel_file not in self.files_to_run) else "if you like...")) debug("files to run are: %r" % (self.files_to_run, )) if rel_file not in self.files_to_run: return False return None # do nose's default behaviour
def _test_file(self, test): file_path = test.address()[0] if not os.path.exists(file_path): raise RuntimeError("test.address does not contain a valid file: %s" % (test.address(),)) return file_util.relative(file_util.source(file_path))