Skip to content

Commit

Permalink
Fixed some implicit imports
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanwp committed Jul 16, 2015
1 parent 8cc2cd1 commit 3324f2b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions cis/test/integration/test_io/test_products/test_data_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ProductTests(object):

@nottest
def setup(self, test_file_metadata, product):
from test.integration_test_data import TestFileTestData
from cis.test.integration_test_data import TestFileTestData
assert isinstance(test_file_metadata, TestFileTestData)
self.filename = test_file_metadata.master_filename
self.valid_variable = test_file_metadata.data_variable_name
Expand Down Expand Up @@ -121,7 +121,7 @@ def test_file_format(self):

class TestCloudsatRVODsdata(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import valid_cloudsat_RVOD_file, valid_cloudsat_RVOD_sdata_variable, \
from cis.test.integration_test_data import valid_cloudsat_RVOD_file, valid_cloudsat_RVOD_sdata_variable, \
valid_cloudsat_RVOD_file_format

self.filename = valid_cloudsat_RVOD_file
Expand All @@ -135,7 +135,7 @@ def check_valid_vars(self, vars):

class TestCloudsatRVODvdata(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import valid_cloudsat_RVOD_file, valid_cloudsat_RVOD_vdata_variable, \
from cis.test.integration_test_data import valid_cloudsat_RVOD_file, valid_cloudsat_RVOD_vdata_variable, \
valid_cloudsat_RVOD_file_format

self.filename = valid_cloudsat_RVOD_file
Expand All @@ -149,7 +149,7 @@ def check_valid_vars(self, vars):

class TestCloudsatPRECIP(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import valid_cloudsat_PRECIP_file, valid_cloudsat_PRECIP_variable, \
from cis.test.integration_test_data import valid_cloudsat_PRECIP_file, valid_cloudsat_PRECIP_variable, \
valid_cloudsat_PRECIP_file_format

self.filename = valid_cloudsat_PRECIP_file
Expand Down Expand Up @@ -239,7 +239,7 @@ def setUp(self):

class TestAeronet(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import valid_aeronet_filename, another_valid_aeronet_filename
from cis.test.integration_test_data import valid_aeronet_filename, another_valid_aeronet_filename
self.setup(cis_test_files["aeronet"], Aeronet)
self.filenames = [valid_aeronet_filename, another_valid_aeronet_filename]

Expand All @@ -250,7 +250,7 @@ def test_create_data_object_from_multiple_files(self):

class TestASCII(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import ascii_filename_with_no_values
from cis.test.integration_test_data import ascii_filename_with_no_values
self.setup(cis_test_files["ascii"], ASCII_Hyperpoints)
self.no_value_filename = ascii_filename_with_no_values

Expand Down Expand Up @@ -283,7 +283,7 @@ def test_create_data_object_with_valid_datetime(self):

class TestNetCDF_Gridded_xenida(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import valid_xenida_filename, valid_xenida_variable
from cis.test.integration_test_data import valid_xenida_filename, valid_xenida_variable

self.filename = valid_xenida_filename
self.valid_variable = valid_xenida_variable
Expand All @@ -309,7 +309,7 @@ def test_create_coords(self):

class TestNetCDF_Gridded_xglnwa(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import valid_1d_filename, valid_1d_variable
from cis.test.integration_test_data import valid_1d_filename, valid_1d_variable

self.filename = valid_1d_filename
self.valid_variable = valid_1d_variable
Expand All @@ -334,7 +334,7 @@ def test_create_coords(self):

class TestNetCDF_Gridded_HadGEM(ProductTests, unittest.TestCase):
def setUp(self):
from test.integration_test_data import valid_hadgem_filename, valid_hadgem_variable
from cis.test.integration_test_data import valid_hadgem_filename, valid_hadgem_variable

self.filename = valid_hadgem_filename
self.valid_variable = valid_hadgem_variable
Expand Down
14 changes: 7 additions & 7 deletions cis/test/integration/test_io/test_products/test_ncar_raf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def check_valid_vars(self, vars):
def test_can_concatenate_files_with_different_time_stamps(self):
from cis.data_io.read import read_data
import numpy as np
from test.integration_test_data import valid_GASSP_station_files_with_different_timestamps,\
from cis.test.integration_test_data import valid_GASSP_station_files_with_different_timestamps,\
valid_GASSP_station_var_with_different_timestamps
var = valid_GASSP_station_var_with_different_timestamps
filename = valid_GASSP_station_files_with_different_timestamps
Expand All @@ -32,7 +32,7 @@ def test_can_concatenate_files_with_different_time_stamps(self):

def test_can_concatenate_aircraft_files(self):
from cis.data_io.read import read_data
from test.integration_test_data import valid_GASSP_aircraft_files_with_different_timestamps,\
from cis.test.integration_test_data import valid_GASSP_aircraft_files_with_different_timestamps,\
valid_GASSP_aircraft_var_with_different_timestamps
data = read_data(valid_GASSP_aircraft_files_with_different_timestamps,
valid_GASSP_aircraft_var_with_different_timestamps)
Expand Down Expand Up @@ -61,39 +61,39 @@ def setUp(self):
class TestNCAR_NetCDF_RAF_get_file_type_error(unittest.TestCase):

def test_WHEN_file_is_GASSP_THEN_no_errors(self):
from test.integration_test_data import valid_GASSP_station_filename
from cis.test.integration_test_data import valid_GASSP_station_filename
product = NCAR_NetCDF_RAF()

errors = product.get_file_type_error(valid_GASSP_station_filename)

assert_that(errors, is_(None), "file should be GASSP")

def test_WHEN_file_is_NCAR_RAF_THEN_no_errors(self):
from test.integration_test_data import valid_NCAR_NetCDF_RAF_filename
from cis.test.integration_test_data import valid_NCAR_NetCDF_RAF_filename
product = NCAR_NetCDF_RAF()

errors = product.get_file_type_error(valid_NCAR_NetCDF_RAF_filename)

assert_that(errors, is_(None), "file should be GASSP")

def test_WHEN_file_dose_not_exist_THEN_errors(self):
from test.integration_test_data import invalid_filename
from cis.test.integration_test_data import invalid_filename
product = NCAR_NetCDF_RAF()

errors = product.get_file_type_error(invalid_filename)

assert_that(errors, is_(["File does not exist"]), "file should not exist")

def test_WHEN_file_is_not_NCAR_RAF_OR_GASSP_THEN_errors(self):
from test.integration_test_data import valid_hadgem_filename
from cis.test.integration_test_data import valid_hadgem_filename
product = NCAR_NetCDF_RAF()

errors = product.get_file_type_error(valid_hadgem_filename)

assert_that(len(errors), is_(1), "file should not be GASSP")

def test_WHEN_file_is_not_netcdf_THEN_errors(self):
from test.integration_test_data import valid_aeronet_filename
from cis.test.integration_test_data import valid_aeronet_filename
product = NCAR_NetCDF_RAF()

errors = product.get_file_type_error(valid_aeronet_filename)
Expand Down

0 comments on commit 3324f2b

Please sign in to comment.