climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boust...@apache.org
Subject svn commit: r1513282 - /incubator/climate/branches/RefactorInput/ocw/tests/test_local.py
Date Mon, 12 Aug 2013 22:18:15 GMT
Author: boustani
Date: Mon Aug 12 22:18:14 2013
New Revision: 1513282

URL: http://svn.apache.org/r1513282
Log:
getting rid of hard coded file directories

Modified:
    incubator/climate/branches/RefactorInput/ocw/tests/test_local.py

Modified: incubator/climate/branches/RefactorInput/ocw/tests/test_local.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/tests/test_local.py?rev=1513282&r1=1513281&r2=1513282&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/tests/test_local.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/tests/test_local.py Mon Aug 12 22:18:14 2013
@@ -112,23 +112,23 @@ class test_load_file(unittest.TestCase):
 
     def test_function_load_file_lats(self):
         '''To test load_file function for latitudes'''
-        self.assertItemsEqual(load_file('/Users/Mboustani/Documents/python/program/ocw2/temporaryNetcdf.nc',
None).lats, self.latitudes)
+        self.assertItemsEqual(load_file(self.file_path, None).lats, self.latitudes)
 
 
     def test_function_load_file_lons(self):
         '''To test load_file function for longitudes'''
-        self.assertItemsEqual(load_file('/Users/Mboustani/Documents/python/program/ocw2/temporaryNetcdf.nc',
None).lons, self.longitudes)
+        self.assertItemsEqual(load_file(self.file_path, None).lons, self.longitudes)
 
 
     def test_function_load_file_times(self):
         '''To test load_file function for times'''
         newTimes = datetime(2001,01,01), datetime(2001,02,01), datetime(2001,03,01)
-        self.assertItemsEqual(load_file('/Users/Mboustani/Documents/python/program/ocw2/temporaryNetcdf.nc',
None).times, newTimes)
+        self.assertItemsEqual(load_file(self.file_path, None).times, newTimes)
 
 
     def test_function_load_file_values(self):
         '''To test load_file function for values'''
-        self.assertTrue(numpy.allclose(load_file('/Users/Mboustani/Documents/python/program/ocw2/temporaryNetcdf.nc',
None).values, self.values))
+        self.assertTrue(numpy.allclose(load_file(self.file_path, None).values, self.values))
 
 
 if __name__ == '__main__':



Mime
View raw message