From 8f19cb0c4e671a6859b3215bba71f4ed31c3b0c8 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Fri, 15 Oct 2021 16:26:49 -0300 Subject: [PATCH] fix: remove sort_keys json dumps inside get method so this way the keys are returned how they were declared --- src/_pytest/cacheprovider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py index b3a10882d..78cec7093 100755 --- a/src/_pytest/cacheprovider.py +++ b/src/_pytest/cacheprovider.py @@ -193,7 +193,7 @@ class Cache: return if not cache_dir_exists_already: self._ensure_supporting_files() - data = json.dumps(value, indent=2, sort_keys=True) + data = json.dumps(value, indent=2) try: f = path.open("w") except OSError: