Skip to content
Snippets Groups Projects
Commit 966204d6 authored by Moul's avatar Moul
Browse files

[fmt] #149: format tests

parent 7d459991
No related branches found
No related tags found
1 merge request!146Merge dev into master branch to complete v0.8.0 development cycle
...@@ -29,9 +29,10 @@ def test_id(): ...@@ -29,9 +29,10 @@ def test_id():
def test_amount(): def test_amount():
"""tests 'silkaj amount' command on gtest""" """tests 'silkaj amount' command on gtest"""
output = check_output(["silkaj", "--gtest", "balance", "3dnbnYY9i2bHMQUGyFp5GVvJ2wBkVpus31cDJA5cfRpj"]).decode() output = check_output(
["silkaj", "--gtest", "balance", "3dnbnYY9i2bHMQUGyFp5GVvJ2wBkVpus31cDJA5cfRpj"]
).decode()
assert "Total amount of: 3dnbnYY9i2bHMQUGyFp5GVvJ2wBkVpus31cDJA5cfRpj" in output assert "Total amount of: 3dnbnYY9i2bHMQUGyFp5GVvJ2wBkVpus31cDJA5cfRpj" in output
assert "Total Relative =" in output assert "Total Relative =" in output
assert "UD ĞTest" in output assert "UD ĞTest" in output
assert "Total Quantitative =" in output assert "Total Quantitative =" in output
...@@ -3,12 +3,9 @@ import pytest ...@@ -3,12 +3,9 @@ import pytest
from silkaj.tx import truncBase from silkaj.tx import truncBase
@pytest.mark.parametrize('amount,base,expected', [ @pytest.mark.parametrize(
(0, 0, 0), "amount,base,expected",
(10, 2, 0), [(0, 0, 0), (10, 2, 0), (100, 2, 100), (306, 2, 300), (3060, 3, 3000)],
(100, 2, 100), )
(306, 2, 300),
(3060, 3, 3000),
])
def test_truncBase(amount, base, expected): def test_truncBase(amount, base, expected):
assert truncBase(amount, base) == expected assert truncBase(amount, base) == expected
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment