コード例 #1
0
ファイル: watcher.py プロジェクト: XiaonuoGantan/autonose
    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))
コード例 #2
0
ファイル: watcher.py プロジェクト: timbertson/autonose
    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))
コード例 #3
0
ファイル: watcher.py プロジェクト: rca/autonose
    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
コード例 #4
0
ファイル: watcher.py プロジェクト: XiaonuoGantan/autonose
    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
コード例 #5
0
ファイル: watcher.py プロジェクト: rca/autonose
 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))