Esempio n. 1
0
    def test_missing_input_file(self):
        """
        Test that a missing csv file raises the correct exception.
        """
        got_except = False

        try:
            csv2sts('somename_not_here.csv', sts_out, 10, 20)
        except IOError, e:
            got_except = True
 def test_missing_input_file(self):
     """
     Test that a missing csv file raises the correct exception.
     """
     got_except = False
     
     try:
         csv2sts('somename_not_here.csv', sts_out, 10, 20)
     except IOError, e:
         got_except = True
    def test_missing_input_file(self):
        """
        Test that a missing csv file raises the correct exception.
        """
        got_except = False

        try:
            csv2sts('somename_not_here.csv', sts_out, 10, 20)
        except IOError as e:
            got_except = True
        except:
            assert False, 'Missing file raised wrong exception.'

        assert got_except is True, 'Missing file did not raise an exception.'
Esempio n. 4
0
 def test_csv2sts_output(self):
     """
     Test that a csv file is correctly rendered to .sts (NetCDF) format.
     """
     csv2sts(testfile_csv, sts_out, latitude=lat, longitude=lon)
     self._check_generated_sts()
 def test_csv2sts_output(self):
     """
     Test that a csv file is correctly rendered to .sts (NetCDF) format.
     """
     csv2sts(testfile_csv, sts_out, latitude = lat, longitude = lon)
     self._check_generated_sts()