コード例 #1
0
    def testShapedConstruction(self):
        """ Testing the construction of the class with non-default parameters. """

        # Attempt to construct an instance of the class.
        parameters = WavePropagatorParameters(use_opmd=True, beamline=setup_S2E_SPI_beamline())

        # Check instance and inheritance.
        self.assertIsInstance( parameters, WavePropagatorParameters )
        self.assertIsInstance( parameters, AbstractCalculatorParameters )

        # Check all parameters are set to default values.
        self.assertTrue( parameters.use_opmd )
        self.assertIsInstance( parameters.beamline, Beamline )
コード例 #2
0
    def setUp(self):
        """ Setting up a test. """
        self.__files_to_remove = []
        self.__dirs_to_remove = []

        self.__beamline = setup_S2E_SPI_beamline()