Skip to content

Commit

Permalink
Merge branch 'develop' into output-claiming-small-amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars authored Oct 6, 2023
2 parents 13fd9c0 + 4883f7c commit 883e2ae
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/bindings-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ jobs:
working-directory: bindings/python
run: tox -e lint-examples

- name: Run linter for tests
if: ${{ startsWith(matrix.os, 'ubuntu-latest') }}
working-directory: bindings/python
run: tox -e lint-tests

- name: Run tests
working-directory: bindings/python
run: tox
File renamed without changes.
2 changes: 1 addition & 1 deletion bindings/python/tests/address_generation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Copyright 2023 IOTA Stiftung
# SPDX-License-Identifier: Apache-2.0

from iota_sdk import Wallet, MnemonicSecretManager, CoinType, ClientOptions
import shutil
from iota_sdk import Wallet, MnemonicSecretManager, CoinType, ClientOptions


def test_address_generation_iota():
Expand Down
13 changes: 6 additions & 7 deletions bindings/python/tests/test_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
# Copyright 2023 IOTA Stiftung
# SPDX-License-Identifier: Apache-2.0

from iota_sdk import Block, Client, MnemonicSecretManager, Utils, SecretManager, OutputId, hex_to_utf8, utf8_to_hex, Bip44, CoinType, Irc27Metadata, Irc30Metadata
import json
import unittest
from iota_sdk import Block, Client, MnemonicSecretManager, Utils, SecretManager, OutputId, hex_to_utf8, utf8_to_hex, Bip44, CoinType, Irc27Metadata, Irc30Metadata


# Read the test vector
tv = dict()
with open('../../sdk/tests/client/fixtures/test_vectors.json') as json_file:
tv = {}
with open('../../sdk/tests/client/fixtures/test_vectors.json', "r", encoding="utf-8") as json_file:
tv = json.load(json_file)

client = Client()
Expand Down Expand Up @@ -57,13 +58,11 @@ def test_output_id(self):
transaction_id = '0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649'
output_index = 42
output_id = OutputId(transaction_id, output_index)
assert output_id.__repr__(
) == '0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c6492a00'
assert repr(output_id) == '0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c6492a00'

new_output_id = OutputId.from_string(
'0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c6492a00')
assert new_output_id.__repr__(
) == '0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c6492a00'
assert repr(new_output_id) == '0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c6492a00'
assert new_output_id.transaction_id == transaction_id
assert new_output_id.output_index == output_index

Expand Down
2 changes: 1 addition & 1 deletion bindings/python/tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Copyright 2023 IOTA Stiftung
# SPDX-License-Identifier: Apache-2.0

from iota_sdk import BasicOutput, AliasOutput, FoundryOutput, NftOutput, IssuerFeature, MetadataFeature
from dacite import from_dict
from iota_sdk import BasicOutput, AliasOutput, FoundryOutput, NftOutput, IssuerFeature, MetadataFeature


def test_feature():
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/tests/test_wallet_destroy.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2023 IOTA Stiftung
# SPDX-License-Identifier: Apache-2.0

from iota_sdk import Wallet, MnemonicSecretManager, CoinType, ClientOptions, WalletError
import shutil
import unittest
from iota_sdk import Wallet, MnemonicSecretManager, CoinType, ClientOptions, WalletError


class WalletDestroy(unittest.TestCase):
Expand Down
11 changes: 10 additions & 1 deletion bindings/python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,13 @@ deps =
pylint
commands =
pip install .
pylint --rcfile=examples/.pylintrc examples/**/*.py
pylint --rcfile=.pylintrc examples/**/*.py

[testenv:lint-tests]
description = Run pylint {basepython} on tests
deps =
-r requirements-dev.txt
pylint
commands =
pip install .
pylint --disable=missing-function-docstring,missing-class-docstring --rcfile=.pylintrc tests/**/*.py

0 comments on commit 883e2ae

Please sign in to comment.