示例#1
0
 def test_get_calendar_class(self):
     registry = IsoRegistry(load_standard_modules=False)
     registry.register('RE', self.region)
     registry.register('RE-SR', self.subregion)
     calendar_class = registry.get_calendar_class('RE')
     self.assertEqual(calendar_class, RegionCalendar)
     # Subregion
     calendar_class = registry.get_calendar_class('RE-SR')
     self.assertEqual(calendar_class, SubRegionCalendar)
     # Unknown code/region
     self.assertIsNone(registry.get_calendar_class('XX'))
示例#2
0
 def test_get_calendar_class(self):
     registry = IsoRegistry(load_standard_modules=False)
     registry.register('RE', self.region)
     calendar_class = registry.get_calendar_class('RE')
     self.assertEqual(calendar_class, RegionCalendar)
示例#3
0
 def test_get_calendar_class(self):
     registry = IsoRegistry()
     registry.register('RE', self.region)
     calendar_class = registry.get_calendar_class('RE')
     self.assertEqual(calendar_class, RegionCalendar)
示例#4
0
 def test_get_calendar_class(self):
     registry = IsoRegistry()
     registry.register('RE', self.region)
     calendar_class = registry.get_calendar_class('RE')
     self.assertEqual(calendar_class, RegionCalendar)