コード例 #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
コード例 #2
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
コード例 #3
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 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.'
コード例 #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()
コード例 #5
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()