()
| 1195 | |
| 1196 | @pytest.mark.gettz |
| 1197 | def test_gettz_set_cache_size(): |
| 1198 | tz.gettz.cache_clear() |
| 1199 | tz.gettz.set_cache_size(3) |
| 1200 | |
| 1201 | PARIS_ref = weakref.ref(tz.gettz("Europe/Paris")) |
| 1202 | EASTER_ref = weakref.ref(tz.gettz("Pacific/Easter")) |
| 1203 | HOBART_ref = weakref.ref(tz.gettz("Australia/Hobart")) |
| 1204 | |
| 1205 | gc.collect() |
| 1206 | |
| 1207 | assert PARIS_ref() is not None |
| 1208 | assert EASTER_ref() is not None |
| 1209 | assert HOBART_ref() is not None |
| 1210 | |
| 1211 | tz.gettz.set_cache_size(2) |
| 1212 | gc.collect() |
| 1213 | |
| 1214 | assert PARIS_ref() is None |
| 1215 | |
| 1216 | @pytest.mark.smoke |
| 1217 | @pytest.mark.gettz |
nothing calls this directly
no test coverage detected