pytest-httpchain-jsonref 0.2.4__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pytest-httpchain-jsonref
3
- Version: 0.2.4
3
+ Version: 0.3.0
4
4
  Summary: JSON reference ($ref) support for pytest-httpchain
5
5
  Author: Alexander Eresov
6
6
  Author-email: Alexander Eresov <aeresov@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pytest-httpchain-jsonref"
3
- version = "0.2.4"
3
+ version = "0.3.0"
4
4
  description = "JSON reference ($ref) support for pytest-httpchain"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -57,8 +57,7 @@ class ReferenceResolver:
57
57
  ReferenceResolverError: If the file cannot be loaded or references cannot be resolved
58
58
  """
59
59
  try:
60
- with open(path, encoding="utf-8") as f:
61
- data = json.load(f)
60
+ data = json.loads(path.read_text(encoding="utf-8"))
62
61
 
63
62
  # If root_path wasn't provided, find a suitable one by going up the directory tree
64
63
  # up to max_parent_traversal_depth levels
@@ -204,8 +203,7 @@ class ReferenceResolver:
204
203
 
205
204
  def _load_json_file(self, path: Path) -> dict[str, Any]:
206
205
  """Load JSON file content."""
207
- with open(path, encoding="utf-8") as f:
208
- return json.load(f)
206
+ return json.loads(path.read_text(encoding="utf-8"))
209
207
 
210
208
  def _create_child_resolver(self) -> Self:
211
209
  """Create a child resolver with inherited state."""