genlayer-test 0.1.1__tar.gz → 0.1.2__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.
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/PKG-INFO +2 -2
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/genlayer_test.egg-info/PKG-INFO +2 -2
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/genlayer_test.egg-info/SOURCES.txt +1 -0
- genlayer_test-0.1.2/genlayer_test.egg-info/requires.txt +2 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/assertions.py +4 -2
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/pyproject.toml +2 -2
- genlayer_test-0.1.2/tests/assertions/test_assertions.py +31 -0
- genlayer_test-0.1.1/genlayer_test.egg-info/requires.txt +0 -2
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/LICENSE +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/README.md +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/genlayer_test.egg-info/dependency_links.txt +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/genlayer_test.egg-info/entry_points.txt +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/genlayer_test.egg-info/top_level.txt +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/__init__.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/artifacts/__init__.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/artifacts/contract.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/exceptions.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/glchain/__init__.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/glchain/account.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/glchain/client.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/glchain/contract.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/helpers/__init__.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/helpers/fixture_snapshot.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/helpers/take_snapshot.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/plugin_config.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/plugin_hooks.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest/types.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/gltest_cli/main.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/setup.cfg +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/artifact/contracts/not_ic_contract.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/artifact/test_contract_definition.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/football_prediction_market.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/intelligent_oracle.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/intelligent_oracle_factory.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/llm_erc20.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/log_indexer.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/multi_file_contract/__init__.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/multi_file_contract/other.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/multi_read_erc20.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/multi_tenant_storage.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/read_erc20.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/storage.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/user_storage.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/wizard_of_coin.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_football_prediction_market.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_intelligent_oracle_factory.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_llm_erc20.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_log_indexer.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_multi_file_contract.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_multi_file_contract_legacy.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_multi_read_erc20.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_multi_tenant_storage.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_read_erc20.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_storage.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_storage_legacy.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_user_storage.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_wizard_of_coin.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/plugin/conftest.py +0 -0
- {genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/plugin/test_plugin_hooks.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: genlayer-test
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: GenLayer Testing Suite
|
5
5
|
Author: GenLayer
|
6
6
|
License-Expression: MIT
|
@@ -16,7 +16,7 @@ Requires-Python: >=3.8
|
|
16
16
|
Description-Content-Type: text/markdown
|
17
17
|
License-File: LICENSE
|
18
18
|
Requires-Dist: pytest
|
19
|
-
Requires-Dist: genlayer-py==0.
|
19
|
+
Requires-Dist: genlayer-py==0.3.0
|
20
20
|
Dynamic: license-file
|
21
21
|
|
22
22
|
# GenLayer Testing Suite
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: genlayer-test
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: GenLayer Testing Suite
|
5
5
|
Author: GenLayer
|
6
6
|
License-Expression: MIT
|
@@ -16,7 +16,7 @@ Requires-Python: >=3.8
|
|
16
16
|
Description-Content-Type: text/markdown
|
17
17
|
License-File: LICENSE
|
18
18
|
Requires-Dist: pytest
|
19
|
-
Requires-Dist: genlayer-py==0.
|
19
|
+
Requires-Dist: genlayer-py==0.3.0
|
20
20
|
Dynamic: license-file
|
21
21
|
|
22
22
|
# GenLayer Testing Suite
|
@@ -25,6 +25,7 @@ gltest/helpers/take_snapshot.py
|
|
25
25
|
gltest_cli/main.py
|
26
26
|
tests/artifact/test_contract_definition.py
|
27
27
|
tests/artifact/contracts/not_ic_contract.py
|
28
|
+
tests/assertions/test_assertions.py
|
28
29
|
tests/examples/contracts/football_prediction_market.py
|
29
30
|
tests/examples/contracts/intelligent_oracle.py
|
30
31
|
tests/examples/contracts/intelligent_oracle_factory.py
|
@@ -6,9 +6,11 @@ def tx_execution_succeeded(result: GenLayerTransaction) -> bool:
|
|
6
6
|
return False
|
7
7
|
if "leader_receipt" not in result["consensus_data"]:
|
8
8
|
return False
|
9
|
-
if
|
9
|
+
if len(result["consensus_data"]["leader_receipt"]) == 0:
|
10
10
|
return False
|
11
|
-
execution_result
|
11
|
+
if "execution_result" not in result["consensus_data"]["leader_receipt"][0]:
|
12
|
+
return False
|
13
|
+
execution_result = result["consensus_data"]["leader_receipt"][0]["execution_result"]
|
12
14
|
return execution_result == "SUCCESS"
|
13
15
|
|
14
16
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "genlayer-test"
|
7
|
-
version = "0.1.
|
7
|
+
version = "0.1.2"
|
8
8
|
description = "GenLayer Testing Suite"
|
9
9
|
authors = [
|
10
10
|
{ name = "GenLayer" }
|
@@ -14,7 +14,7 @@ readme = "README.md"
|
|
14
14
|
requires-python = ">=3.8"
|
15
15
|
dependencies = [
|
16
16
|
"pytest",
|
17
|
-
"genlayer-py==0.
|
17
|
+
"genlayer-py==0.3.0",
|
18
18
|
]
|
19
19
|
classifiers = [
|
20
20
|
"Development Status :: 4 - Beta",
|
@@ -0,0 +1,31 @@
|
|
1
|
+
from gltest.assertions import tx_execution_succeeded, tx_execution_failed
|
2
|
+
|
3
|
+
GENLAYER_SUCCESS_TRANSACTION = {
|
4
|
+
"consensus_data": {"leader_receipt": [{"execution_result": "SUCCESS"}]}
|
5
|
+
}
|
6
|
+
|
7
|
+
GENLAYER_FAILED_TRANSACTION = {
|
8
|
+
"consensus_data": {"leader_receipt": [{"execution_result": "ERROR"}]}
|
9
|
+
}
|
10
|
+
|
11
|
+
GENLAYER_EMPTY_LEADER_RECEIPT = {"consensus_data": {"leader_receipt": []}}
|
12
|
+
|
13
|
+
|
14
|
+
def test_with_successful_transaction():
|
15
|
+
assert tx_execution_succeeded(GENLAYER_SUCCESS_TRANSACTION) is True
|
16
|
+
assert tx_execution_failed(GENLAYER_SUCCESS_TRANSACTION) is False
|
17
|
+
|
18
|
+
|
19
|
+
def test_with_failed_transaction():
|
20
|
+
assert tx_execution_succeeded(GENLAYER_FAILED_TRANSACTION) is False
|
21
|
+
assert tx_execution_failed(GENLAYER_FAILED_TRANSACTION) is True
|
22
|
+
|
23
|
+
|
24
|
+
def test_with_empty_leader_receipt():
|
25
|
+
assert tx_execution_succeeded(GENLAYER_EMPTY_LEADER_RECEIPT) is False
|
26
|
+
assert tx_execution_failed(GENLAYER_EMPTY_LEADER_RECEIPT) is True
|
27
|
+
|
28
|
+
|
29
|
+
def test_with_invalid_transaction():
|
30
|
+
assert tx_execution_succeeded({}) is False
|
31
|
+
assert tx_execution_failed({}) is True
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/football_prediction_market.py
RENAMED
File without changes
|
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/intelligent_oracle_factory.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/multi_file_contract/__init__.py
RENAMED
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/multi_file_contract/other.py
RENAMED
File without changes
|
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/contracts/multi_tenant_storage.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_football_prediction_market.py
RENAMED
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_intelligent_oracle_factory.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_multi_file_contract.py
RENAMED
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_multi_file_contract_legacy.py
RENAMED
File without changes
|
File without changes
|
{genlayer_test-0.1.1 → genlayer_test-0.1.2}/tests/examples/tests/test_multi_tenant_storage.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|