pytest-resources 0.2.0__tar.gz → 0.2.1__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.
Files changed (36) hide show
  1. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/.gitignore +1 -1
  2. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/CHANGELOG.md +11 -1
  3. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/PKG-INFO +1 -1
  4. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/integration/test_synth_library.py +9 -3
  5. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/LICENSE +0 -0
  6. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/README.md +0 -0
  7. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/pyproject.toml +0 -0
  8. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/__init__.py +0 -0
  9. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/errors.py +0 -0
  10. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/formats.py +0 -0
  11. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/hooks.py +0 -0
  12. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/index.py +0 -0
  13. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/loaders.py +0 -0
  14. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/nodes.py +0 -0
  15. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/plugin.py +0 -0
  16. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/py.typed +0 -0
  17. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/src/pytest_resources/synth.py +0 -0
  18. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/integration/test_library.py +0 -0
  19. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/binary/blob.dat +0 -0
  20. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/config/app.ini +0 -0
  21. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/config/manifest.jsonc +0 -0
  22. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/config/settings.toml +0 -0
  23. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/data/movies.csv +0 -0
  24. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/structured/nested/deep.json +0 -0
  25. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/structured/sample.json +0 -0
  26. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/structured/sample2.json +0 -0
  27. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/unstructured/sample.md +0 -0
  28. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/resources/unstructured/sample2.md +0 -0
  29. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_formats.py +0 -0
  30. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_hook.py +0 -0
  31. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_index.py +0 -0
  32. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_init.py +0 -0
  33. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_loaders.py +0 -0
  34. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_nodes_synth.py +0 -0
  35. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_plugin.py +0 -0
  36. {pytest_resources-0.2.0 → pytest_resources-0.2.1}/tests/unit/test_synth.py +0 -0
@@ -210,7 +210,7 @@ tempCodeRunnerFile.py
210
210
  .pypirc
211
211
 
212
212
  # Local release secrets — never commit
213
- gh_token
213
+ *_token
214
214
  *.token
215
215
 
216
216
  # Marimo
@@ -6,6 +6,15 @@ adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.1] - 2026-09-24
10
+
11
+ ### Fixed
12
+
13
+ - The test suite is now cross-platform: file formats that `faker-file`/Pillow cannot
14
+ synthesize on Windows/macOS (missing system font, temporary-file locks) skip with a reason
15
+ instead of failing, and the synthetic-text assertion compares against the loader's raw
16
+ byte decode. No change to shipped behaviour.
17
+
9
18
  ## [0.2.0] - 2026-09-24
10
19
 
11
20
  ### Added
@@ -54,6 +63,7 @@ First release.
54
63
  - A module-lifetime decode cache per tree, and typed misses (`EntryNotFoundError` /
55
64
  `KeyError`) that carry a `difflib` "did you mean" hint.
56
65
 
57
- [unreleased]: https://github.com/damvolkov/pytest-resources/compare/v0.2.0...HEAD
66
+ [unreleased]: https://github.com/damvolkov/pytest-resources/compare/v0.2.1...HEAD
67
+ [0.2.1]: https://github.com/damvolkov/pytest-resources/releases/tag/v0.2.1
58
68
  [0.2.0]: https://github.com/damvolkov/pytest-resources/releases/tag/v0.2.0
59
69
  [0.1.0]: https://github.com/damvolkov/pytest-resources/releases/tag/v0.1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pytest-resources
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Lazy, typed, attribute-navigable fixtures for test resource files, with pluggable canonical loaders (e-serde by default).
5
5
  Project-URL: Homepage, https://github.com/damvolkov/pytest-resources
6
6
  Project-URL: Source, https://github.com/damvolkov/pytest-resources
@@ -120,7 +120,10 @@ def test_make_is_reproducible_under_a_seed(tree: Resources) -> None:
120
120
  )
121
121
  @pytest.mark.filterwarnings("ignore:imghdr was removed in Python 3.13:DeprecationWarning")
122
122
  def test_file_writes_a_real_non_empty_file(tree: Resources, kind: FileType) -> None:
123
- path = tree.file(kind)
123
+ try:
124
+ path = tree.file(kind)
125
+ except OSError as exc:
126
+ pytest.skip(f"faker-file cannot synthesize {kind.value} here: {exc}") # needs a system font / no temp lock
124
127
  assert path.exists()
125
128
  assert path.stat().st_size > 0
126
129
  assert pr.FileType.of_path(path) is kind
@@ -133,7 +136,7 @@ def test_file_resolves_a_suffix_from_a_filename(tree: Resources) -> None:
133
136
 
134
137
  def test_named_file_is_adopted_and_decoded_like_an_authored_one(tree: Resources) -> None:
135
138
  path = tree.file("txt", name="note")
136
- assert tree.note == path.read_text()
139
+ assert tree.note == path.read_bytes().decode() # the node value is exactly the loader's decode
137
140
  assert path in tree.paths("*.txt")
138
141
 
139
142
 
@@ -148,7 +151,10 @@ def test_csv_synthetic_stays_raw_bytes_until_a_loader_is_bound(tree: Resources)
148
151
 
149
152
 
150
153
  def test_choice_and_walk_see_synthetic_files(tree: Resources) -> None:
151
- path = tree.file("png", name="logo")
154
+ try:
155
+ path = tree.file("png", name="logo")
156
+ except OSError as exc:
157
+ pytest.skip(f"faker-file cannot synthesize png here: {exc}") # needs a system font
152
158
  assert tree.choice("*.png") == path.read_bytes()
153
159
  assert path in list(tree.walk("*.png"))
154
160