genlayer-test 0.1.3__py3-none-any.whl → 0.3.0__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.
Files changed (43) hide show
  1. {genlayer_test-0.1.3.dist-info → genlayer_test-0.3.0.dist-info}/METADATA +77 -10
  2. genlayer_test-0.3.0.dist-info/RECORD +65 -0
  3. {genlayer_test-0.1.3.dist-info → genlayer_test-0.3.0.dist-info}/entry_points.txt +1 -1
  4. gltest/__init__.py +4 -4
  5. gltest/artifacts/__init__.py +5 -2
  6. gltest/artifacts/contract.py +94 -14
  7. gltest/glchain/__init__.py +3 -3
  8. gltest/glchain/account.py +15 -11
  9. gltest/glchain/client.py +39 -3
  10. gltest/glchain/contract.py +98 -31
  11. gltest/helpers/fixture_snapshot.py +3 -2
  12. gltest_cli/config/__init__.py +0 -0
  13. gltest_cli/config/constants.py +10 -0
  14. gltest_cli/config/general.py +10 -0
  15. gltest_cli/config/plugin.py +102 -0
  16. gltest_cli/config/types.py +137 -0
  17. gltest_cli/config/user.py +222 -0
  18. gltest_cli/logging.py +51 -0
  19. tests/__init__.py +0 -0
  20. tests/examples/tests/test_llm_erc20.py +2 -2
  21. tests/examples/tests/test_multi_read_erc20.py +13 -3
  22. tests/examples/tests/test_multi_tenant_storage.py +12 -3
  23. tests/examples/tests/test_read_erc20.py +2 -2
  24. tests/examples/tests/test_storage.py +4 -2
  25. tests/examples/tests/test_user_storage.py +17 -3
  26. tests/gltest/__init__.py +0 -0
  27. tests/gltest/artifact/__init__.py +0 -0
  28. tests/gltest/artifact/contracts/duplicate_ic_contract_1.py +22 -0
  29. tests/gltest/artifact/contracts/duplicate_ic_contract_2.py +22 -0
  30. tests/{artifact → gltest/artifact}/test_contract_definition.py +29 -30
  31. tests/gltest_cli/__init__.py +0 -0
  32. tests/gltest_cli/config/test_plugin.py +127 -0
  33. tests/gltest_cli/config/test_user.py +351 -0
  34. genlayer_test-0.1.3.dist-info/RECORD +0 -53
  35. gltest/plugin_config.py +0 -42
  36. gltest/plugin_hooks.py +0 -51
  37. tests/plugin/test_plugin_hooks.py +0 -78
  38. {genlayer_test-0.1.3.dist-info → genlayer_test-0.3.0.dist-info}/WHEEL +0 -0
  39. {genlayer_test-0.1.3.dist-info → genlayer_test-0.3.0.dist-info}/licenses/LICENSE +0 -0
  40. {genlayer_test-0.1.3.dist-info → genlayer_test-0.3.0.dist-info}/top_level.txt +0 -0
  41. /tests/{plugin/conftest.py → conftest.py} +0 -0
  42. /tests/{artifact → gltest/artifact}/contracts/not_ic_contract.py +0 -0
  43. /tests/{assertions → gltest/assertions}/test_assertions.py +0 -0
@@ -1,78 +0,0 @@
1
- def test_help_message(pytester):
2
- result = pytester.runpytest(
3
- "--help",
4
- )
5
- # fnmatch_lines does an assertion internally
6
- result.stdout.fnmatch_lines(
7
- [
8
- "gltest:",
9
- "*--contracts-dir=CONTRACTS_DIR",
10
- "*Directory containing contract files",
11
- "*--default-wait-interval=DEFAULT_WAIT_INTERVAL",
12
- "*Default wait interval for waiting transaction receipts",
13
- "*--default-wait-retries=DEFAULT_WAIT_RETRIES",
14
- "*Default wait retries for waiting transaction receipts",
15
- "*--rpc-url=RPC_URL*RPC URL for the genlayer network",
16
- ]
17
- )
18
-
19
-
20
- def test_default_wait_interval(pytester):
21
-
22
- pytester.makepyfile(
23
- """
24
- from gltest.plugin_config import get_default_wait_interval
25
-
26
- def test_default_wait_interval():
27
- assert get_default_wait_interval() == 5000
28
- """
29
- )
30
-
31
- result = pytester.runpytest("--default-wait-interval=5000", "-v")
32
-
33
- result.stdout.fnmatch_lines(
34
- [
35
- "*::test_default_wait_interval PASSED*",
36
- ]
37
- )
38
- assert result.ret == 0
39
-
40
-
41
- def test_default_wait_retries(pytester):
42
- pytester.makepyfile(
43
- """
44
- from gltest.plugin_config import get_default_wait_retries
45
-
46
- def test_default_wait_retries():
47
- assert get_default_wait_retries() == 4000
48
- """
49
- )
50
-
51
- result = pytester.runpytest("--default-wait-retries=4000", "-v")
52
-
53
- result.stdout.fnmatch_lines(
54
- [
55
- "*::test_default_wait_retries PASSED*",
56
- ]
57
- )
58
- assert result.ret == 0
59
-
60
-
61
- def test_rpc_url(pytester):
62
- pytester.makepyfile(
63
- """
64
- from gltest.plugin_config import get_rpc_url
65
-
66
- def test_rpc_url():
67
- assert get_rpc_url() == 'http://custom-rpc-url:8545'
68
- """
69
- )
70
-
71
- result = pytester.runpytest("--rpc-url=http://custom-rpc-url:8545", "-v")
72
-
73
- result.stdout.fnmatch_lines(
74
- [
75
- "*::test_rpc_url PASSED*",
76
- ]
77
- )
78
- assert result.ret == 0
File without changes