()
| 1603 | @pytest.mark.smoke |
| 1604 | @pytest.mark.tzstr |
| 1605 | def test_tzstr_weakref(): |
| 1606 | tz_t1 = tz.tzstr('EST5EDT') |
| 1607 | tz_t2_ref = weakref.ref(tz.tzstr('EST5EDT')) |
| 1608 | assert tz_t1 is tz_t2_ref() |
| 1609 | |
| 1610 | del tz_t1 |
| 1611 | gc.collect() |
| 1612 | |
| 1613 | assert tz_t2_ref() is not None |
| 1614 | assert tz.tzstr('EST5EDT') is tz_t2_ref() |
| 1615 | |
| 1616 | for offset in range(5,15): |
| 1617 | tz.tzstr('GMT+{}'.format(offset)) |
| 1618 | gc.collect() |
| 1619 | |
| 1620 | assert tz_t2_ref() is None |
| 1621 | assert tz.tzstr('EST5EDT') is not tz_t2_ref() |
| 1622 | |
| 1623 | |
| 1624 | @pytest.mark.tzstr |
nothing calls this directly
no outgoing calls
no test coverage detected