Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit c36bc9d

Browse files
authored
Merge branch 'master' into anvacaru/vacuous-2
2 parents 7d68bdc + 7232884 commit c36bc9d

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

deps/k_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0.44
1+
6.0.48

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.407
1+
0.1.408

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pyk"
7-
version = "0.1.407"
7+
version = "0.1.408"
88
description = ""
99
authors = [
1010
"Runtime Verification, Inc. <[email protected]>",

src/pyk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
from typing import Final
77

88

9-
K_VERSION: Final = '6.0.44'
9+
K_VERSION: Final = '6.0.48'

src/tests/integration/kore/test_kore_client.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
from dataclasses import asdict
34
from string import Template
45
from typing import TYPE_CHECKING
56

@@ -213,6 +214,19 @@ def state(n: int) -> State:
213214
)
214215

215216

217+
def assert_execute_result_equals(actual: ExecuteResult, expected: ExecuteResult) -> None:
218+
assert type(actual) == type(expected)
219+
220+
actual_dict = asdict(actual) # type: ignore
221+
expected_dict = asdict(expected) # type: ignore
222+
if 'next_states' in actual_dict and actual.next_states is not None:
223+
actual_dict['next_states'] = set(actual.next_states)
224+
if 'next_states' in expected_dict and expected.next_states is not None:
225+
expected_dict['next_states'] = set(expected.next_states)
226+
227+
assert actual_dict == expected_dict
228+
229+
216230
class TestBooster(BoosterClientTest):
217231
MAIN_FILE = K_FILES / 'kore-rpc-test.k'
218232
MODULE_NAME = 'KORE-RPC-TEST'
@@ -233,15 +247,7 @@ def test_execute_booster(
233247
# When
234248
actual = booster_client.execute(term(n), **params)
235249
# Then
236-
assert actual.__class__ == expected.__class__
237-
assert actual.reason == expected.reason
238-
assert actual.state == expected.state
239-
assert actual.depth == expected.depth
240-
assert actual.rule == expected.rule
241-
if actual.next_states is not None and expected.next_states is not None:
242-
assert set(actual.next_states) == set(expected.next_states)
243-
else:
244-
assert actual.next_states == expected.next_states
250+
assert_execute_result_equals(actual, expected)
245251

246252

247253
class TestKoreClient(KoreClientTest):
@@ -265,7 +271,7 @@ def test_execute(
265271
actual = kore_client.execute(term(n), **params)
266272

267273
# Then
268-
assert actual == expected
274+
assert_execute_result_equals(actual, expected)
269275

270276
@pytest.mark.parametrize(
271277
'test_id,antecedent,consequent,expected',

0 commit comments

Comments
 (0)