Skip to content

Commit

Permalink
update unit test notes
Browse files Browse the repository at this point in the history
  • Loading branch information
pochedls committed Nov 18, 2021
1 parent b3994f8 commit 9483cf9
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ def setUp(self, tmp_path):
self.file_path = f"{self.dir}/file.nc"

def test_non_cf_compliant_time(self):
# Generate dummy datasets with non-CF compliant time units that aren't
# encoded yet.
# Generate dummy datasets with non-CF compliant time units
ds = generate_dataset(cf_compliant=False, has_bounds=False)
ds.to_netcdf(self.file_path)

Expand All @@ -130,8 +129,7 @@ def test_non_cf_compliant_time(self):
assert result is False

def test_cf_compliant_time(self):
# Generate dummy datasets with non-CF compliant time units that aren't
# encoded yet.
# Generate dummy datasets with CF compliant time units
ds = generate_dataset(cf_compliant=True, has_bounds=False)
ds.to_netcdf(self.file_path)

Expand All @@ -141,9 +139,9 @@ def test_cf_compliant_time(self):
assert result is True

def test_no_time_axis(self):
# Generate dummy datasets with non-CF compliant time units that aren't
# encoded yet.
# Generate dummy datasets with CF compliant time
ds = generate_dataset(cf_compliant=True, has_bounds=False)
# remove time axis
ds = ds.isel(time=0)
ds = ds.squeeze(drop=True)
ds = ds.reset_coords()
Expand All @@ -156,8 +154,7 @@ def test_no_time_axis(self):
assert result is None

def test_glob_cf_compliant_time(self):
# Generate dummy datasets with non-CF compliant time units that aren't
# encoded yet.
# Generate dummy datasets with CF compliant time
ds = generate_dataset(cf_compliant=True, has_bounds=False)
ds.to_netcdf(self.file_path)

Expand All @@ -167,8 +164,7 @@ def test_glob_cf_compliant_time(self):
assert result is True

def test_list_cf_compliant_time(self):
# Generate dummy datasets with non-CF compliant time units that aren't
# encoded yet.
# Generate dummy datasets with CF compliant time units
ds = generate_dataset(cf_compliant=True, has_bounds=False)
ds.to_netcdf(self.file_path)

Expand Down

0 comments on commit 9483cf9

Please sign in to comment.