Exemple #1
0
    def test_output_port_name(self):
        read = FitsReadingModule(name_in='read',
                                 input_dir=self.test_dir + 'images',
                                 image_tag='images')
        read.add_output_port('test')

        with pytest.warns(UserWarning) as warning:
            read.add_output_port('test')

        assert len(warning) == 1
        assert warning[0].message.args[0] == 'Tag \'test\' of ReadingModule \'read\' is already ' \
                                             'used.'

        process = BadPixelSigmaFilterModule(name_in='badpixel',
                                            image_in_tag='images',
                                            image_out_tag='im_out')

        process.add_output_port('test')

        with pytest.warns(UserWarning) as warning:
            process.add_output_port('test')

        assert len(warning) == 1
        assert warning[0].message.args[0] == 'Tag \'test\' of ProcessingModule \'badpixel\' is ' \
                                             'already used.'

        self.pipeline.m_data_storage.close_connection()

        process._m_data_base = self.test_dir + 'database.hdf5'
        process.add_output_port('new')
Exemple #2
0
    def test_output_port_name(self):
        read = FitsReadingModule(name_in="read",
                                 input_dir=self.test_dir + "images",
                                 image_tag="images")
        read.add_output_port("test")

        with pytest.warns(UserWarning) as warning:
            read.add_output_port("test")

        assert len(warning) == 1
        assert warning[0].message.args[
            0] == "Tag 'test' of ReadingModule 'read' is already used."

        process = BadPixelSigmaFilterModule(name_in="badpixel",
                                            image_in_tag="images")
        process.add_output_port("test")

        with pytest.warns(UserWarning) as warning:
            process.add_output_port("test")

        assert len(warning) == 1
        assert warning[0].message.args[0] == "Tag 'test' of ProcessingModule 'badpixel' is " \
                                             "already used."

        self.pipeline.m_data_storage.close_connection()

        process._m_data_base = self.test_dir + "database.hdf5"
        process.add_output_port("new")
    def test_output_port_name(self) -> None:

        module = FitsReadingModule(name_in='read',
                                   image_tag='images',
                                   input_dir=self.test_dir + 'images')

        module.add_output_port('test')

        with pytest.warns(UserWarning) as warning:
            module.add_output_port('test')

        assert len(warning) == 1
        assert warning[0].message.args[0] == 'Tag \'test\' of ReadingModule \'read\' is already ' \
                                             'used.'

        module = BadPixelSigmaFilterModule(name_in='badpixel',
                                           image_in_tag='images',
                                           image_out_tag='im_out')

        module.add_output_port('test')

        with pytest.warns(UserWarning) as warning:
            module.add_output_port('test')

        assert len(warning) == 1
        assert warning[0].message.args[0] == 'Tag \'test\' of ProcessingModule \'badpixel\' is ' \
                                             'already used.'