Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from os.path import dirname, join | |
| from unittest import TestCase | |
| from decimal import Decimal | |
| from pytezos import ContractInterface, pytezos, format_timestamp, MichelsonRuntimeError | |
| class MyContractTest(TestCase): | |
| @classmethod | |
| def setUpClass(cls): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parameter string; | |
| storage string; | |
| code { DUP; | |
| DIP { CAR ; NIL string ; SWAP ; CONS } ; | |
| CDR ; CONS ; | |
| CONCAT ; | |
| NIL operation; PAIR } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test_concat(self): | |
| res = self.my.call('bar').result(storage='foo') | |
| self.assertEqual('foobar', res.storage) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cls.my = ContractInterface.create_from(join(dirname(__file__), 'my_contract.tz'), | |
| shell='sandboxnet') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cls.my = ContractInterface.create_from(join(project_dir, 'src/my_contract.tz'), | |
| factory=NonFungibleTokenImpl) |