def test_is_caffe_log_invalid_content(self): fpath = os.path.join(self.dir_tmp, "caffe.hostname.username.log.INFO.20150917-163712.31405") with open(fpath, 'w') as f: f.write('foo') assert_false(lu.is_caffe_log(fpath))
def test_is_caffe_log_invalid_content(self): fpath = os.path.join( self.dir_tmp, "caffe.hostname.username.log.INFO.20150917-163712.31405") with open(fpath, 'w') as f: f.write('foo') assert_false(lu.is_caffe_log(fpath))
def test_is_caffe_info_log(self): assert_true(lu.is_caffe_log(self.path_real_log))
def test_is_caffe_log_invalid_dir(self): assert_true(os.path.isdir(self.dir_tmp)) assert_false(lu.is_caffe_log(self.dir_tmp))