tsherwen / AC_tools

Module for working with global/regional Chemical Transport Model (CTM) output and observations
MIT License
13 stars 10 forks source link

test_convert_to_netCDF / "test_files" dir issue? #77

Closed tsherwen closed 5 years ago

tsherwen commented 7 years ago

The ctm.bpch conversion test function (test_convert_to_netCDF) is currently failing with the below error. The "test_files" directory is not being generated when "py.test --slow" is run from fresh, is this the issue?

========================================================================== FAILURES ========================================================================== ___ test_convert_to_netCDF ___

@slow
def test_convert_to_netCDF():
    logging.info("beginning test")
    # Recreate a ctm.nc file and confirm it is the same
    logging.debug("Creating the temp netCDF file")
    convert_to_netCDF(folder=test_file_dir, bpch_file_list=['test.bpch'], remake=True, filename='test.nc')
    datafile = os.path.join(test_file_dir, 'ctm.nc')
    testfile = os.path.join(test_file_dir, 'test.nc')

    logging.debug("Comparing the temp netCDF file to the origional")
  assert file_comparison(datafile, testfile), \

'bpch converter failed to replicate the original file.' E AssertionError: bpch converter failed to replicate the original file. E assert file_comparison('../data/ctm.nc', '../data/test.nc')

test_bpch2netCDF.py:61: AssertionError -------------------------------------------------------------------- Captured stdout call -------------------------------------------------------------------- Creating a netCDF from 1 file(s). This can take some time... ============================================================ 1 failed, 33 passed in 92.23 seconds ============================================================