예제 #1
0
    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))
예제 #2
0
    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))
예제 #3
0
    def test_is_caffe_info_log(self):

        assert_true(lu.is_caffe_log(self.path_real_log))
예제 #4
0
    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))
예제 #5
0
    def test_is_caffe_info_log(self):

        assert_true(lu.is_caffe_log(self.path_real_log))
예제 #6
0
    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))