• Home
  • Raw
  • Download

Lines Matching full:season

144         class Season(Enum):  class
149 self.Season = Season
179 Season = self.Season
181 set(dir(Season)),
187 Season = self.Season
189 set(dir(Season.WINTER)),
221 Season = self.Season
222 self.assertIs(Season(Season.WINTER), Season.WINTER)
225 Season = self.Season
226 self.assertEqual(Season.SPRING.value, 1)
232 Season = self.Season
233 lst = list(Season)
234 self.assertEqual(len(lst), len(Season))
235 self.assertEqual(len(Season), 4, Season)
237 [Season.SPRING, Season.SUMMER, Season.AUTUMN, Season.WINTER], lst)
239 for i, season in enumerate('SPRING SUMMER AUTUMN WINTER'.split(), 1):
240 e = Season(i)
241 self.assertEqual(e, getattr(Season, season))
244 self.assertEqual(e.name, season)
245 self.assertIn(e, Season)
246 self.assertIs(type(e), Season)
247 self.assertIsInstance(e, Season)
248 self.assertEqual(str(e), 'Season.' + season)
251 '<Season.{0}: {1}>'.format(season, i),
255 Season = self.Season
256 self.assertEqual(Season.SPRING.name, 'SPRING')
257 self.assertEqual(Season.SPRING.value, 1)
259 Season.SPRING.name = 'invierno'
261 Season.SPRING.value = 2
264 Season = self.Season
266 Season.WINTER = 'really cold'
269 class Season(Enum): class
278 self.assertTrue(hasattr(Season, 'spam'))
279 del Season.spam
280 self.assertFalse(hasattr(Season, 'spam'))
283 del Season.SPRING
285 del Season.DRY
287 del Season.SPRING.name
342 Season = self.Season
343 self.assertIn(Season.AUTUMN, Season)
345 self.assertNotIn(3, Season)
347 self.assertNotIn('AUTUMN', Season)
349 val = Season(3)
350 self.assertIn(val, Season)
354 self.assertNotIn(OtherEnum.two, Season)
357 self.assertRaises(TypeError, lambda: 'test' in self.Season.AUTUMN)
358 self.assertRaises(TypeError, lambda: 3 in self.Season.AUTUMN)
359 self.assertRaises(TypeError, lambda: 'AUTUMN' in self.Season.AUTUMN)
362 Season = self.Season
364 Season.SPRING < Season.WINTER
366 Season.SPRING > 4
368 self.assertNotEqual(Season.SPRING, 1)
375 self.assertNotEqual(Season.SPRING, Part.SPRING)
377 Season.SPRING < Part.CLIP
380 class Season(Enum): class
386 lst = list(Season)
389 [Season.SPRING, Season.SUMMER,
390 Season.AUTUMN, Season.WINTER,
392 self.assertIs(Season.FALL, Season.AUTUMN)
393 self.assertEqual(Season.FALL.value, 3)
394 self.assertEqual(Season.AUTUMN.value, 3)
395 self.assertIs(Season(3), Season.AUTUMN)
396 self.assertIs(Season(1), Season.SPRING)
397 self.assertEqual(Season.FALL.name, 'AUTUMN')
399 [k for k,v in Season.__members__.items() if v.name != k],
442 Season = self.Season
443 self.assertEqual('{}'.format(Season.SPRING),
444 '{}'.format(str(Season.SPRING)))
445 self.assertEqual( '{:}'.format(Season.SPRING),
446 '{:}'.format(str(Season.SPRING)))
447 self.assertEqual('{:20}'.format(Season.SPRING),
448 '{:20}'.format(str(Season.SPRING)))
449 self.assertEqual('{:^20}'.format(Season.SPRING),
450 '{:^20}'.format(str(Season.SPRING)))
451 self.assertEqual('{:>20}'.format(Season.SPRING),
452 '{:>20}'.format(str(Season.SPRING)))
453 self.assertEqual('{:<20}'.format(Season.SPRING),
454 '{:<20}'.format(str(Season.SPRING)))
512 Season = self.Season
514 dates[Season.WINTER] = '1225'
515 dates[Season.SPRING] = '0315'
516 dates[Season.SUMMER] = '0704'
517 dates[Season.AUTUMN] = '1031'
518 self.assertEqual(dates[Season.AUTUMN], '1031')
699 Season = self.Season
700 self.assertTrue(getattr(Season, '__eq__'))
703 class Season(Enum): class
709 list(Season),
710 [Season.SUMMER, Season.WINTER, Season.AUTUMN, Season.SPRING],
715 list(reversed(self.Season)),
716 [self.Season.WINTER, self.Season.AUTUMN, self.Season.SUMMER,
717 self.Season.SPRING]