Skip to content

Commit

Permalink
Modified test_snapshot_to_json_sets_primitive for Python 3.8 (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
CulmoneY committed Sep 30, 2024
1 parent 2e3061a commit 667ea92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Renamed `test_expr_wrapper` to `test_z3_parser`
- Refactored codebase to use modern type annotations. Replaced `List` with `list`, `Dict` with `dict`, `Set` with `set`, and `Tuple` with `tuple`
- Checked for variable reassignment in `AugAssign` and `AnnAssign` node in parsing edge Z3 constraints
- Modified `test_snapshot_to_json_sets_primitive` for Python 3.8 compatibility

## [2.8.1] - 2024-08-19

Expand Down
13 changes: 7 additions & 6 deletions tests/test_debug/test_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,15 @@ def test_snapshot_to_json_sets_primitive():
]

# Validate that every id-value pair in the set matches an expected pair
for id_, value in zip(expected_ids_for_test_var1a, expected_values_for_test_var1a):
assert {"id": id_, "type": "int", "value": value} in json_data_objects
json_data_modified = [{"type": obj["type"], "value": obj["value"]} for obj in json_data_objects]
for _, value in zip(expected_ids_for_test_var1a, expected_values_for_test_var1a):
assert {"type": "int", "value": value} in json_data_modified

for id_, value in zip(expected_ids_for_test_var2a, expected_values_for_test_var2a):
assert {"id": id_, "type": "bool", "value": value} in json_data_objects
for _, value in zip(expected_ids_for_test_var2a, expected_values_for_test_var2a):
assert {"type": "bool", "value": value} in json_data_modified

for id_, value in zip(expected_ids_for_projects, expected_values_for_projects):
assert {"id": id_, "type": "str", "value": value} in json_data_objects
for _, value in zip(expected_ids_for_projects, expected_values_for_projects):
assert {"type": "str", "value": value} in json_data_modified


def test_snapshot_to_json_dicts_primitive():
Expand Down

0 comments on commit 667ea92

Please sign in to comment.