SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Functions | Variables
tests.test_interface_fetch_timeserie Namespace Reference

Functions

def test_set_get_datetime
 Test set_datetime/get_datetime on some datetime values. More...
 
def test_get_set_datetime_db
 Test get_datetime/set_datetime on the whole DB (if any). More...
 
def test_find_fetch_level
 Test find flevel on some filenames. More...
 
def test_find_fetch_level_db
 Test find flevel on the whole DB (if any). More...
 
def test_set_name_np1
 Test set_name_np1 for all fetch types from fetch level 0 to max(fetch levels) - 1. More...
 
def test_read_remote_server
 Test read_remote_server. More...
 
def test_vn2vnp1_noforce
 Test vn2vnp1 routine without Force option. More...
 
def test_vn2vnp1_force
 Test vn2vnp1 routine with Force option. More...
 

Variables

 xfail = pytest.mark.xfail
 
 skip = pytest.mark.skip
 
 skipif = pytest.mark.skipif
 
 parametrize = pytest.mark.parametrize
 
tuple assertions = unittest.TestCase('__init__')
 

Function Documentation

def tests.test_interface_fetch_timeserie.test_find_fetch_level (   fetch_type,
  flevel_in,
  filename_in 
)

Test find flevel on some filenames.

def tests.test_interface_fetch_timeserie.test_find_fetch_level_db ( )

Test find flevel on the whole DB (if any).

def tests.test_interface_fetch_timeserie.test_get_set_datetime_db ( )

Test get_datetime/set_datetime on the whole DB (if any).

def tests.test_interface_fetch_timeserie.test_read_remote_server (   fetch_type,
  date_min,
  n_theoric 
)

Test read_remote_server.

For all fetch_type, read the list of available files on server. Print the list with print_metafiles routines. Check it has around the good number of files:

  • DISCOVER_MAG: from date_min to today UTC - 2 days, every day
  • DISCOVER_VELOCITY: from date_min to today UTC - 2 days, every day
  • STEREOA_MAG: from date_min to today UTC, every day
  • STEREOA_VELOCITY: from date_min to today UTC, every day
  • ACE_MAGLV4: from date_min to today UTC - 2 days, every day
  • ACE_VELOCITYLV4: from date_min to today UTC, every day
def tests.test_interface_fetch_timeserie.test_set_get_datetime (   date_in)

Test set_datetime/get_datetime on some datetime values.

def tests.test_interface_fetch_timeserie.test_set_name_np1 ( )

Test set_name_np1 for all fetch types from fetch level 0 to max(fetch levels) - 1.

def tests.test_interface_fetch_timeserie.test_vn2vnp1_force ( )

Test vn2vnp1 routine with Force option.

Create a list of 3 fictive files of flevel n.

  • Vn-file 1: no existing Vn+1 file. Should be in the output list.
  • Vn-file 2: existing and older Vn+1 file. Should be in the output list.
  • Vn-file 3: existing and newer Vn+1 file. Should not be in the output list.

Do not test the case N=-1, when it checks from remote metafiles.

def tests.test_interface_fetch_timeserie.test_vn2vnp1_noforce ( )

Test vn2vnp1 routine without Force option.

Create a list of 3 fictive files of flevel n.

  • Vn-file 1: no existing Vn+1 file. Should be in the output list.
  • Vn-file 2: existing and older Vn+1 file. Should be in the output list.
  • Vn-file 3: existing and newer Vn+1 file. Should not be in the output list.

Do not test the case N=-1, when it checks from remote metafiles.

Variable Documentation

tuple tests.test_interface_fetch_timeserie.assertions = unittest.TestCase('__init__')
tests.test_interface_fetch_timeserie.parametrize = pytest.mark.parametrize
tests.test_interface_fetch_timeserie.skip = pytest.mark.skip
tests.test_interface_fetch_timeserie.skipif = pytest.mark.skipif
tests.test_interface_fetch_timeserie.xfail = pytest.mark.xfail