Skip to content

Commit

Permalink
Add Informational Messages to ksoroban/komet test (#32)
Browse files Browse the repository at this point in the history
* Add info messages

* Set Version: 0.1.23

* format

* Set Version: 0.1.25

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
bbyalcinkaya and devops authored Sep 4, 2024
1 parent b6690a8 commit 5b4a346
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.24
0.1.25
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "komet"
version = "0.1.24"
version = "0.1.25"
description = "K tooling for the Soroban platform"
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
12 changes: 9 additions & 3 deletions src/komet/kasmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,21 @@ def deploy_and_run(self, contract_wasm: Path) -> None:
Raises:
CalledProcessError if any of the tests fail
"""
print(f'Processing contract: {contract_wasm.stem}')

contract_kast = self.kast_from_wasm(contract_wasm)
conf, subst = self.deploy_test(contract_kast)

bindings = self.contract_bindings(contract_wasm)
bindings = [b for b in self.contract_bindings(contract_wasm) if b.name.startswith('test_')]

print(f'Discovered {len(bindings)} test functions:')
for binding in bindings:
if not binding.name.startswith('test_'):
continue
print(f' - {binding.name}')

for binding in bindings:
print(f'\n Running {binding.name}...')
self.run_test(conf, subst, binding)
print(' Test passed.')

def deploy_and_prove(self, contract_wasm: Path, proof_dir: Path | None = None) -> None:
"""Prove all of the tests in a soroban test contract.
Expand Down

0 comments on commit 5b4a346

Please sign in to comment.