Ensure keys order is preserved when saving dicts (#9205).
(pytester: Pytester)
| 1319 | |
| 1320 | |
| 1321 | def test_preserve_keys_order(pytester: Pytester) -> None: |
| 1322 | class="st">""class="st">"Ensure keys order is preserved when saving dicts (class="cm">#9205)."class="st">"" |
| 1323 | from _pytest.cacheprovider import Cache |
| 1324 | |
| 1325 | config = pytester.parseconfig() |
| 1326 | cache = Cache.for_config(config, _ispytest=True) |
| 1327 | cache.set(class="st">"foo", {class="st">"z": 1, class="st">"b": 2, class="st">"a": 3, class="st">"d": 10}) |
| 1328 | read_back = cache.get(class="st">"foo", None) |
| 1329 | assert list(read_back.items()) == [(class="st">"z", 1), (class="st">"b", 2), (class="st">"a", 3), (class="st">"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