コード例 #1
0
    def do(self):
        try:
            #call exe (write file)a
            #subprocess category.exe
            ret = callprocess.callhoge(self._exepath,self._inputfile,self._outputfile)
            
            #open file defined categorized urls
            #sample http://domain.com,"news"
            ret = self._getCategorizedUrls()

            return ret
        except Exception as e:
            self._mylog.error("inputfile:" + self._inputfile +  " outputfile:" + self._outputfile)
            raise Exception(e.args)
コード例 #2
0
    def do(self):
        try:
            #call exe (write file)a
            #subprocess category.exe
            ret = callprocess.callhoge(self._exepath, self._inputfile,
                                       self._outputfile)

            #open file defined categorized urls
            #sample http://domain.com,"news"
            ret = self._getCategorizedUrls()

            return ret
        except Exception as e:
            self._mylog.error("inputfile:" + self._inputfile + " outputfile:" +
                              self._outputfile)
            raise Exception(e.args)
コード例 #3
0
 def test_success(self):
     ret = callprocess.callhoge("ls")
     self.assertEqual(ret,0)
コード例 #4
0
 def test_err_lack_of_args(self):
     with self.assertRaises(Exception):
         callprocess.callhoge("ls -al","b")
コード例 #5
0
 def test_err_processname_not_exists(self):
     with self.assertRaises(Exception):
         callprocess.callhoge("a","a","b")