Пример #1
0
    def test_missing_header(self):
        d = parse_deva_detection_file(
            osp.join(self.data_dir, 'deva_example-missing_header.csv'))

        assert d.shape != self.correct.shape,\
            "result arrays were the same shape, shouldn't have been."

        # since they should be of different shape, this should return false.
        assert self.correct != d
Пример #2
0
    def test_missing_header(self):
        d = parse_deva_detection_file(
            osp.join(self.data_dir, 'deva_example-missing_header.csv')
        )

        assert d.shape != self.correct.shape,\
            "result arrays were the same shape, shouldn't have been."

        # since they should be of different shape, this should return false.
        assert self.correct != d
Пример #3
0
    def test_correct(self):
        d = parse_deva_detection_file(
            osp.join(self.data_dir, 'deva_example-correct.csv'))

        assert d.shape == self.correct.shape, \
            "Result array shapes didn't match!"

        # noinspection PyUnresolvedReferences
        # -> return is an ndarray, which **does** have an all() method
        assert (self.correct == d).all(), \
            "read and expected didn't match"
Пример #4
0
    def test_correct(self):
        d = parse_deva_detection_file(osp.join(self.data_dir,
                                               'deva_example-correct.csv'))

        assert d.shape == self.correct.shape, \
            "Result array shapes didn't match!"

        # noinspection PyUnresolvedReferences
        # -> return is an ndarray, which **does** have an all() method
        assert (self.correct == d).all(), \
            "read and expected didn't match"