'''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
    

[((144, 199), 'os.path.join', 'os.path.join', (['xroms.__path__[0]', '""".."""', '"""tests"""', '"""input"""'], {}), "(xroms.__path__[0], '..', 'tests', 'input')\n", (156, 199), False, 'import os\n'), ((209, 244), 'glob.glob', 'glob', (["('%s/ocean_his_000?.nc' % base)"], {}), "('%s/ocean_his_000?.nc' % base)\n", (213, 244), False, 'from glob import glob\n'), ((254, 278), 'xroms.open_netcdf', 'xroms.open_netcdf', (['files'], {}), '(files)\n', (271, 278), False, 'import xroms\n'), ((375, 430), 'os.path.join', 'os.path.join', (['xroms.__path__[0]', '""".."""', '"""tests"""', '"""input"""'], {}), "(xroms.__path__[0], '..', 'tests', 'input')\n", (387, 430), False, 'import os\n'), ((440, 472), 'glob.glob', 'glob', (["('%s/ocean_his_000?' % base)"], {}), "('%s/ocean_his_000?' % base)\n", (444, 472), False, 'from glob import glob\n'), ((482, 530), 'xroms.open_zarr', 'xroms.open_zarr', (['files'], {'chunks': "{'ocean_time': 2}"}), "(files, chunks={'ocean_time': 2})\n", (497, 530), False, 'import xroms\n')]