Ensure keys order is preserved when saving dicts (#9205).
(pytester: Pytester)
| 1319 | |
| 1320 | |
| 1321 | def test_preserve_keys_order(pytester: Pytester) -> None: |
| 1322 | """Ensure keys order is preserved when saving dicts (#9205).""" |
| 1323 | from _pytest.cacheprovider import Cache |
| 1324 | |
| 1325 | config = pytester.parseconfig() |
| 1326 | cache = Cache.for_config(config, _ispytest=True) |
| 1327 | cache.set("foo", {"z": 1, "b": 2, "a": 3, "d": 10}) |
| 1328 | read_back = cache.get("foo", None) |
| 1329 | assert list(read_back.items()) == [("z", 1), ("b", 2), ("a", 3), ("d", 10)] |
| 1330 | |
| 1331 | |
| 1332 | def test_does_not_create_boilerplate_in_existing_dirs(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…