pytest-jsonschema-snapshot 0.2.6__py3-none-any.whl → 0.2.7__py3-none-any.whl
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.
- pytest_jsonschema_snapshot/__init__.py +1 -1
- pytest_jsonschema_snapshot/core.py +5 -5
- {pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/METADATA +1 -1
- {pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/RECORD +7 -7
- {pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/WHEEL +0 -0
- {pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/entry_points.txt +0 -0
- {pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/licenses/LICENSE +0 -0
|
@@ -35,7 +35,7 @@ class SchemaShot:
|
|
|
35
35
|
format_mode: str = "on",
|
|
36
36
|
update_mode: bool = False,
|
|
37
37
|
reset_mode: bool = False,
|
|
38
|
-
update_actions: dict[str, bool] = {},
|
|
38
|
+
update_actions: Optional[dict[str, bool]] = {},
|
|
39
39
|
save_original: bool = False,
|
|
40
40
|
debug_mode: bool = False,
|
|
41
41
|
snapshot_dir_name: str = "__snapshots__",
|
|
@@ -55,7 +55,7 @@ class SchemaShot:
|
|
|
55
55
|
# self.examples_limit: int = examples_limit
|
|
56
56
|
self.update_mode: bool = update_mode
|
|
57
57
|
self.reset_mode: bool = reset_mode
|
|
58
|
-
self.update_actions: dict[str, bool] = update_actions
|
|
58
|
+
self.update_actions: dict[str, bool] = dict(update_actions or {})
|
|
59
59
|
self.save_original: bool = save_original
|
|
60
60
|
self.debug_mode: bool = debug_mode
|
|
61
61
|
self.snapshot_dir: Path = root_dir / snapshot_dir_name
|
|
@@ -116,7 +116,7 @@ class SchemaShot:
|
|
|
116
116
|
pathvalidate.validate_filename(
|
|
117
117
|
name, platform="auto"
|
|
118
118
|
) # allow_reserved=False по умолчанию
|
|
119
|
-
except ValidationError as e:
|
|
119
|
+
except pathvalidate.ValidationError as e:
|
|
120
120
|
raise ValueError(f"Invalid schema name: {e}") from None
|
|
121
121
|
|
|
122
122
|
return name
|
|
@@ -221,9 +221,9 @@ class SchemaShot:
|
|
|
221
221
|
# --- состояние ДО проверки ---
|
|
222
222
|
schema_exists_before = schema_path.exists()
|
|
223
223
|
|
|
224
|
-
def make_schema(
|
|
224
|
+
def make_schema(current_data: dict | list, type_data: Literal["json", "schema"]) -> dict:
|
|
225
225
|
if type_data == "schema":
|
|
226
|
-
return current_data
|
|
226
|
+
return dict(current_data)
|
|
227
227
|
elif type_data == "json":
|
|
228
228
|
self.conv.clear_data()
|
|
229
229
|
self.conv.add_json(current_data)
|
{pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-jsonschema-snapshot
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Pytest plugin for automatic JSON Schema generation and validation from examples
|
|
5
5
|
Project-URL: Homepage, https://miskler.github.io/pytest-jsonschema-snapshot/basic/quick_start.html
|
|
6
6
|
Project-URL: Repository, https://github.com/Miskler/pytest-jsonschema-snapshot
|
{pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/RECORD
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
pytest_jsonschema_snapshot/__init__.py,sha256=
|
|
2
|
-
pytest_jsonschema_snapshot/core.py,sha256=
|
|
1
|
+
pytest_jsonschema_snapshot/__init__.py,sha256=p9j8PZm3T2ARGn6DDfi3eriQgxWUeG3OnsIUu47e-Sc,385
|
|
2
|
+
pytest_jsonschema_snapshot/core.py,sha256=vdxBcMgExxpbanNSoH9nBc-WlAp2GP_0y7ZdtM53Cz4,13679
|
|
3
3
|
pytest_jsonschema_snapshot/plugin.py,sha256=nvAfxtLSX_B5FzaWu7DfsiWRxFjxDvnQNNOhkRrRnbw,8677
|
|
4
4
|
pytest_jsonschema_snapshot/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
pytest_jsonschema_snapshot/stats.py,sha256=BfhfMoSkRq6Q8BwhVfrpcFl5TP9OzpgpLwnKf1Kslkw,9593
|
|
6
6
|
pytest_jsonschema_snapshot/tools/__init__.py,sha256=WeD2EVrQpKIoFW1s43QAqsJmartqZ3Irwckt814P1bs,59
|
|
7
7
|
pytest_jsonschema_snapshot/tools/name_maker.py,sha256=tqss8NCGSo2aQX_-RkCJzy3NJx_TDA-xrn8qsblecf0,5799
|
|
8
|
-
pytest_jsonschema_snapshot-0.2.
|
|
9
|
-
pytest_jsonschema_snapshot-0.2.
|
|
10
|
-
pytest_jsonschema_snapshot-0.2.
|
|
11
|
-
pytest_jsonschema_snapshot-0.2.
|
|
12
|
-
pytest_jsonschema_snapshot-0.2.
|
|
8
|
+
pytest_jsonschema_snapshot-0.2.7.dist-info/METADATA,sha256=01Tcn8pRGSbdLh-vCNmRXJrfuRylgZ_MsuupxrQH4Rc,7798
|
|
9
|
+
pytest_jsonschema_snapshot-0.2.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
10
|
+
pytest_jsonschema_snapshot-0.2.7.dist-info/entry_points.txt,sha256=eJ1x4TMmhcc8YtM7IoCsUJO4-rLeTrGy8tPgkrojjKs,58
|
|
11
|
+
pytest_jsonschema_snapshot-0.2.7.dist-info/licenses/LICENSE,sha256=1HRFdSzlJ4BtHv6U7tZun3iCArjbCnm5NUowE9hZpNs,1071
|
|
12
|
+
pytest_jsonschema_snapshot-0.2.7.dist-info/RECORD,,
|
{pytest_jsonschema_snapshot-0.2.6.dist-info → pytest_jsonschema_snapshot-0.2.7.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|