[ https://issues.apache.org/jira/browse/CLIMATE-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15216417#comment-15216417 ]
ASF GitHub Bot commented on CLIMATE-774: ---------------------------------------- Github user jarifibrahim commented on the pull request: https://github.com/apache/climate/pull/322#issuecomment-203016653 The tests failed when they were executed from the root folder of climate project. Try executing `nosetests` from the root climate folder to reproduce these errors. The tests failed because of the path to the required file was absolute. I've changed it to a relative path. Also `mock` is one of the dependency for tests which was missing in the dependency list. > Fix failing tests > ----------------- > > Key: CLIMATE-774 > URL: https://issues.apache.org/jira/browse/CLIMATE-774 > Project: Apache Open Climate Workbench > Issue Type: Bug > Reporter: Ibrahim Jarif > > ====================================================================== > ERROR: test_proper_return_format (ocw.tests.test_utils.TestDecodeTimes) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/travis/build/jarifibrahim/climate/ocw/tests/test_utils.py", > line 34, in setUp > self.netcdf = netCDF4.Dataset(os.path.abspath(self.test_model), mode='r') > File "netCDF4/_netCDF4.pyx", line 1795, in > netCDF4._netCDF4.Dataset.__init__ (netCDF4/_netCDF4.c:12271) > RuntimeError: No such file or directory > ====================================================================== > ERROR: test_valid_time_processing (ocw.tests.test_utils.TestDecodeTimes) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/travis/build/jarifibrahim/climate/ocw/tests/test_utils.py", > line 34, in setUp > self.netcdf = netCDF4.Dataset(os.path.abspath(self.test_model), mode='r') > File "netCDF4/_netCDF4.pyx", line 1795, in > netCDF4._netCDF4.Dataset.__init__ (netCDF4/_netCDF4.c:12271) > RuntimeError: No such file or directory > ====================================================================== > ERROR: Failure: ImportError (No module named mock) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/loader.py", > line 414, in loadTestsFromName > addr.filename, addr.module) > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/importer.py", > line 47, in importFromPath > return self.importFromDir(dir_path, fqname) > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/importer.py", > line 94, in importFromDir > mod = load_module(part_fqname, fh, filename, desc) > File > "/home/travis/build/jarifibrahim/climate/ocw_config_runner/tests/test_config_parsing.py", > line 18, in <module> > from mock import patch > ImportError: No module named mock > ====================================================================== > ERROR: Failure: ImportError (No module named mock) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/loader.py", > line 414, in loadTestsFromName > addr.filename, addr.module) > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/importer.py", > line 47, in importFromPath > return self.importFromDir(dir_path, fqname) > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/importer.py", > line 94, in importFromDir > mod = load_module(part_fqname, fh, filename, desc) > File > "/home/travis/build/jarifibrahim/climate/ocw_config_runner/tests/test_config_writer.py", > line 18, in <module> > from mock import patch > ImportError: No module named mock > ====================================================================== > ERROR: Failure: ImportError (No module named mock) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/loader.py", > line 414, in loadTestsFromName > addr.filename, addr.module) > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/importer.py", > line 47, in importFromPath > return self.importFromDir(dir_path, fqname) > File "/home/travis/miniconda/lib/python2.7/site-packages/nose/importer.py", > line 94, in importFromDir > mod = load_module(part_fqname, fh, filename, desc) > File > "/home/travis/build/jarifibrahim/climate/ocw_config_runner/tests/test_evaluation_creation.py", > line 18, in <module> > from mock import patch > ImportError: No module named mock > ---------------------------------------------------------------------- > Ran 131 tests in 14.459s > FAILED (errors=5) -- This message was sent by Atlassian JIRA (v6.3.4#6332)