Skip to content

Commit

Permalink
fixed 2 unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbarring committed Feb 14, 2022
1 parent ca6e351 commit 8eefa23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cf_units/tests/unit/unit/test_Unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

class Test___init__(unittest.TestCase):
def test_capitalised_calendar(self):
calendar = "GrEgoRian"
expected = cf_units.CALENDAR_GREGORIAN
calendar = "StAnDaRd"
expected = cf_units.CALENDAR_STANDARD
u = Unit("hours since 1970-01-01 00:00:00", calendar=calendar)
self.assertEqual(u.calendar, expected)

Expand Down
4 changes: 2 additions & 2 deletions cf_units/tests/unit/unit/test_as_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def test_cf_unit(self):
def test_non_cf_unit_no_calendar(self):
# On passing as_unit a cf_unit.Unit-like object (not a cf_unit.Unit
# object) with no calendar, ensure that a cf_unit.Unit is returned
# with default calendar (Gregorian).
# with default calendar (standard).
unit = StubUnit()
result = as_unit(unit)

self.assertEqual(result.calendar, "gregorian")
self.assertEqual(result.calendar, "standard")
self.assertIsInstance(result, Unit)

def test_non_cf_unit_with_calendar(self):
Expand Down

0 comments on commit 8eefa23

Please sign in to comment.