(self)
| 245 | assert wtz.tzinfo == tz |
| 246 | |
| 247 | def test_maybe_make_aware(self): |
| 248 | aware = datetime.now(_timezone.utc).replace(tzinfo=timezone.utc) |
| 249 | assert maybe_make_aware(aware) |
| 250 | naive = datetime.now() |
| 251 | assert maybe_make_aware(naive) |
| 252 | assert maybe_make_aware(naive).tzinfo is ZoneInfo("UTC") |
| 253 | |
| 254 | tz = ZoneInfo('US/Eastern') |
| 255 | eastern = datetime.now(_timezone.utc).replace(tzinfo=tz) |
| 256 | assert maybe_make_aware(eastern).tzinfo is tz |
| 257 | utcnow = datetime.now() |
| 258 | assert maybe_make_aware(utcnow, 'UTC').tzinfo is ZoneInfo("UTC") |
| 259 | |
| 260 | |
| 261 | class test_localize: |
nothing calls this directly
no test coverage detected