Coverage for tests / test_removal_deadline.py: 83%

6 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-20 20:02 +0000

1"""Time-bomb reminder to remove vivarium-compat once migrations are complete. 

2 

3Fires after the deadline below. If you hit this: 

4 - If all downstream packages have migrated to the new import paths, 

5 delete libs/compat/ (see README for the full removal checklist). 

6 - If migrations are still in progress, bump the deadline and note why. 

7 

8Note: this deadline is independent of 

9``libs/config-tree/tests/unit/test_removal_deadline.py``, which governs the 

10lifetime of the ``LayeredConfigTree`` -> ``ConfigTree`` deprecation alias only. 

11The two currently share a date but should not be assumed to move in lockstep - 

12update each one when its specific shim is actually retired. 

13""" 

14 

15import datetime 

16 

17import pytest 

18 

19_REMOVAL_DEADLINE = datetime.date(2027, 7, 1) 

20 

21 

22def test_remove_by_deadline(): 

23 if datetime.date.today() >= _REMOVAL_DEADLINE: 

24 pytest.fail( 

25 f"vivarium-compat hit its removal deadline ({_REMOVAL_DEADLINE}). " 

26 "If migrations are complete, delete libs/compat/ (see README). " 

27 "If not, bump _REMOVAL_DEADLINE in this file and document why." 

28 )