Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rcomer committed Feb 13, 2022
1 parent d1d1e00 commit 4886af4
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# importing anything else.
import iris.tests as tests # isort:skip

import unittest

from cf_units import CALENDAR_360_DAY, CALENDAR_GREGORIAN, Unit
from cftime import datetime as nc_datetime
import numpy as np
Expand Down Expand Up @@ -733,7 +731,6 @@ def test_t1_list_t2_scalar(self):


class TestArrayInputWithLBTIM_0_3_1(TestField):
@unittest.skip("#3508 investigate unit test failure")
def test_t1_scalar_t2_list(self):
lbtim = _lbtim(ib=3, ic=1)
lbcode = _lbcode(1)
Expand All @@ -744,6 +741,7 @@ def test_t1_scalar_t2_list(self):
t2 = [nc_datetime(year, 1, 11, hour=9) for year in years]
t2_dims = (0,)
lbft = 3.0 # Sample period
leap_year_adjust = np.array([0, 24, 24])

coords_and_dims = _convert_time_coords(
lbcode=lbcode,
Expand All @@ -758,15 +756,18 @@ def test_t1_scalar_t2_list(self):
# Expected coords.
points = np.ones_like(years) * lbft
bounds = np.array(
[lbft - ((years - 1970) * 365 * 24 + 2 * 24), points]
[
lbft - ((years - 1970) * 365 * 24 + 2 * 24 + leap_year_adjust),
points,
]
).transpose()
fp_coord = AuxCoord(
points,
standard_name="forecast_period",
units="hours",
bounds=bounds,
)
points = (years - 1970) * 365 * 24 + 10 * 24 + 9
points = (years - 1970) * 365 * 24 + 10 * 24 + 9 + leap_year_adjust
bounds = np.array(
[np.ones_like(points) * (8 * 24 + 9), points]
).transpose()
Expand Down

0 comments on commit 4886af4

Please sign in to comment.