##// END OF EJS Templates
Made more consistent plugin install path with CMake, removed useless plugin lookup path...
Made more consistent plugin install path with CMake, removed useless plugin lookup path Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1346:d8cb4bff8c14
r1398:728acc3a845d
Show More
TestAmdaDownload.py
41 lines | 1.3 KiB | text/x-python | PythonLexer
/ plugins / amda / tests / TestAmdaDownload.py
Added basic tests around Amda plugin Python wrapper...
r1340 import sys
import os
if not hasattr(sys, 'argv'):
sys.argv = ['']
current_script_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(current_script_path)
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346
Added basic tests around Amda plugin Python wrapper...
r1340 import pytestamda
Some refactoring on PB11 wrappers...
r1341 import pysciqlopcore
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346
import sciqlopqt
Some refactoring on PB11 wrappers...
r1341 import amda
Added basic tests around Amda plugin Python wrapper...
r1340
import numpy as np
import datetime
import time
import unittest
import ddt
@ddt.ddt
class FunctionalTests(unittest.TestCase):
def setUp(self):
pass
@ddt.data(
(datetime.datetime(2012,10,20,8,10,00),datetime.datetime(2012,10,20,12,0,0)),
(datetime.datetime(2025,1,1,15,0,0),datetime.datetime(2025,1,1,16,0,0)),
(datetime.datetime(2000,1,1,0,0,0),datetime.datetime(2000,1,1,12,0,0))
)
def test_simple_download(self, case):
tstart = case[0]
tstop = case[1]
Some refactoring on PB11 wrappers...
r1341 pytestamda.TimeController.setTime(pysciqlopcore.SqpRange(tstart, tstop))
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346 variable = pytestamda.VariableController.createVariable("bx_gse",pytestamda.amda_provider(), pysciqlopcore.SqpRange(tstart, tstop))
Some refactoring on PB11 wrappers...
r1341 pytestamda.VariableController.wait_for_downloads()
Added basic tests around Amda plugin Python wrapper...
r1340 t_ref, x_ref, y_ref, z_ref = amda.generate_data(np.datetime64(tstart), np.datetime64(tstop), 4)
Some refactoring on PB11 wrappers...
r1341 self.assertTrue( amda.compare_with_ref(variable,(t_ref, x_ref, y_ref, z_ref) ) )
Added basic tests around Amda plugin Python wrapper...
r1340
if __name__ == '__main__':
unittest.main(exit=False)