# Path: pyfusion/test/tests.py
# class PfTestBase(object):
#     """Base class for generated sql and non-sql test cases."""
#     pass


from pyfusion.test.tests import PfTestBase
        from pyfusion.acquisition.FakeData.acq import FakeDataAcquisition
        from pyfusion.acquisition.base import BaseAcquisition
        from pyfusion.acquisition.FakeData.acq import FakeDataAcquisition
        from pyfusion import conf
        from pyfusion.data.timeseries import TimeseriesData
        from numpy.testing import assert_array_almost_equal
        from pyfusion.devices.base import Device
        from pyfusion import conf, config
        from pyfusion import getDevice
        from pyfusion.data.timeseries import TimeseriesData
        from pyfusion.acquisition.base import BaseDataFetcher
        from pyfusion.acquisition.FakeData.fetch import SingleChannelSineFetcher
        from pyfusion.acquisition.FakeData.fetch import SingleChannelSineFetcher
        from pyfusion.data.timeseries import TimeseriesData
        from numpy import arange, sin, pi
        from numpy.testing import assert_array_almost_equal
        from pyfusion.acquisition.base import MultiChannelFetcher
        from pyfusion.acquisition.FakeData.acq import FakeDataAcquisition
        from pyfusion import config
        from numpy.testing import assert_array_almost_equal
        test_device = getDevice(self.listed_device)
        test_data = test_device.acquisition.getdata(self.shot_number, timeseries_test_channel_1)
        self.assertTrue(isinstance(test_data, TimeseriesData))


class CheckFakeDataFetchers(PfTestBase):
    """test DataFetcher subclasses for fake data acquisition."""

    def test_base_classes(self):
        self.assertTrue(BaseDataFetcher in SingleChannelSineFetcher.__bases__)

    def test_singlechannelsinedf(self):
        n_samples = 1000
        sample_freq=1.e6
        amplitude = 1.0
        frequency = 3.e4
        t0 = 0.0
        test_shot = -1
        output_data_fetcher = SingleChannelSineFetcher(None, test_shot, sample_freq=sample_freq,
                                                  n_samples=n_samples,
                                                  amplitude=amplitude,
                                                  frequency=frequency,
                                                  t0 = t0)
        output_data = output_data_fetcher.fetch()
        self.assertTrue(isinstance(output_data, TimeseriesData))
        test_timebase = arange(t0, t0+float(n_samples)/sample_freq, 1./sample_freq)
        assert_array_almost_equal(output_data.timebase, test_timebase)
        test_signal = amplitude*sin(2*pi*frequency*test_timebase)
        assert_array_almost_equal(output_data.signal, test_signal)


# Path: pyfusion/test/tests.py
# class PfTestBase(object):
#     """Base class for generated sql and non-sql test cases."""
#     pass


# Path: pyfusion/acquisition/FakeData/tests.py
from pyfusion.test.tests import PfTestBase
        from pyfusion.acquisition.FakeData.acq import FakeDataAcquisition
        from pyfusion.acquisition.base import BaseAcquisition
        from pyfusion.acquisition.FakeData.acq import FakeDataAcquisition
        from pyfusion import conf
        from pyfusion.data.timeseries import TimeseriesData
        from numpy.testing import assert_array_almost_equal
        from pyfusion.devices.base import Device
        from pyfusion import conf, config
        from pyfusion import getDevice
        from pyfusion.data.timeseries import TimeseriesData
        from pyfusion.acquisition.base import BaseDataFetcher
        from pyfusion.acquisition.FakeData.fetch import SingleChannelSineFetcher
        from pyfusion.acquisition.FakeData.fetch import SingleChannelSineFetcher
        from pyfusion.data.timeseries import TimeseriesData
        from numpy import arange, sin, pi
        from numpy.testing import assert_array_almost_equal
        from pyfusion.acquisition.base import MultiChannelFetcher
        from pyfusion.acquisition.FakeData.acq import FakeDataAcquisition
        from pyfusion import config
        from numpy.testing import assert_array_almost_equal

        test_device = getDevice(self.listed_device)
        test_data = test_device.acquisition.getdata(self.shot_number, timeseries_test_channel_1)
        self.assertTrue(isinstance(test_data, TimeseriesData))


class CheckFakeDataFetchers(PfTestBase):
    """test DataFetcher subclasses for fake data acquisition."""

    def test_base_classes(self):
        self.assertTrue(BaseDataFetcher in SingleChannelSineFetcher.__bases__)

    def test_singlechannelsinedf(self):
        n_samples = 1000
        sample_freq=1.e6
        amplitude = 1.0
        frequency = 3.e4
        t0 = 0.0
        test_shot = -1
        output_data_fetcher = SingleChannelSineFetcher(None, test_shot, sample_freq=sample_freq,
                                                  n_samples=n_samples,
                                                  amplitude=amplitude,
                                                  frequency=frequency,
                                                  t0 = t0)
        output_data = output_data_fetcher.fetch()
        self.assertTrue(isinstance(output_data, TimeseriesData))
        test_timebase = arange(t0, t0+float(n_samples)/sample_freq, 1./sample_freq)
        assert_array_almost_equal(output_data.timebase, test_timebase)
        test_signal = amplitude*sin(2*pi*frequency*test_timebase)
        assert_array_almost_equal(output_data.signal, test_signal)


class CheckMultiChannel(PfTestBase):