def test_algorithm_process(): """Algorithm_test.test_algorithm_process() confirms that algorithm.process returns an obspy.core.stream object """ algorithm = Algorithm() timeseries = Stream() outputstream = algorithm.process(timeseries) assert_is_instance(outputstream, Stream)
def test_algorithm_channels(): """Algorithm_test.test_algorithm_channels() confirms that algorithm.get_input_channels returns the correct channels confirms that algorithm.get_output_channels returns the correct channels """ inchannels = ['H', 'E', 'Z', 'F'] outchannels = ['H', 'D', 'Z', 'F'] algorithm = Algorithm(inchannels=inchannels, outchannels=outchannels) assert_equals(algorithm.get_input_channels(), inchannels) assert_equals(algorithm.get_output_channels(), outchannels)
def test_algorithm_channels(): """Algorithm_test.test_algorithm_channels() confirms that algorithm.get_input_channels returns the correct channels confirms that algorithm.get_output_channels returns the correct channels """ inchannels = ["H", "E", "Z", "F"] outchannels = ["H", "D", "Z", "F"] algorithm = Algorithm(inchannels=inchannels, outchannels=outchannels) assert_equal(algorithm.get_input_channels(), inchannels) assert_equal(algorithm.get_output_channels(), outchannels)
def test_controller(): """Controller_test.test_controller() instantiate the controller, make certain the factories and algorithms are set """ inputfactory = TimeseriesFactory() outputfactory = TimeseriesFactory() algorithm = Algorithm() controller = Controller(inputfactory, outputfactory, algorithm) assert_is_instance(controller._inputFactory, TimeseriesFactory) assert_is_instance(controller._outputFactory, TimeseriesFactory) assert_is_instance(controller._algorithm, Algorithm)