'''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, 'os.path.join', 'os.path.join', False, 'import os\n'), (12, 'glob.glob', 'glob', False, 'from glob import glob\n'), (13, 'xroms.open_netcdf', 'xroms.open_netcdf', False, 'import xroms\n'), (20, 'os.path.join', 'os.path.join', False, 'import os\n'), (21, 'glob.glob', 'glob', False, 'from glob import glob\n'), (22, 'xroms.open_zarr', 'xroms.open_zarr', False, 'import xroms\n')]