'''Test package.'''

import xroms
from glob import glob
import os


def test_open_netcdf():
    '''Test xroms.open_netcdf().'''
    
    base = os.path.join(xroms.__path__[0],'..','tests','input')
    files = glob('%s/ocean_his_000?.nc' % base)
    ds = xroms.open_netcdf(files)
    
    assert ds
    
def test_open_zarr():
    '''Test xroms.open_zarr().'''
    
    base = os.path.join(xroms.__path__[0],'..','tests','input')
    files = glob('%s/ocean_his_000?' % base)
    ds = xroms.open_zarr(files, chunks={'ocean_time':2})
    
    assert ds
    

[((11, 11, 11, 63), 'os.path.join', 'os.path.join', ({(11, 24, 11, 41): 'xroms.__path__[0]', (11, 42, 11, 46): '""".."""', (11, 47, 11, 54): '"""tests"""', (11, 55, 11, 62): '"""input"""'}, {}), "(xroms.__path__[0], '..', 'tests', 'input')", False, 'import os\n'), ((12, 12, 12, 47), 'glob.glob', 'glob', ({(12, 17, 12, 46): "'%s/ocean_his_000?.nc' % base"}, {}), "('%s/ocean_his_000?.nc' % base)", False, 'from glob import glob\n'), ((13, 9, 13, 33), 'xroms.open_netcdf', 'xroms.open_netcdf', ({(13, 27, 13, 32): 'files'}, {}), '(files)', False, 'import xroms\n'), ((20, 11, 20, 63), 'os.path.join', 'os.path.join', ({(20, 24, 20, 41): 'xroms.__path__[0]', (20, 42, 20, 46): '""".."""', (20, 47, 20, 54): '"""tests"""', (20, 55, 20, 62): '"""input"""'}, {}), "(xroms.__path__[0], '..', 'tests', 'input')", False, 'import os\n'), ((21, 12, 21, 44), 'glob.glob', 'glob', ({(21, 17, 21, 43): "'%s/ocean_his_000?' % base"}, {}), "('%s/ocean_his_000?' % base)", False, 'from glob import glob\n'), ((22, 9, 22, 56), 'xroms.open_zarr', 'xroms.open_zarr', (), '', False, 'import xroms\n')]