Commit 966204d6 authored by Moul's avatar Moul

[fmt] #149: format tests

parent 7d459991
......@@ -29,9 +29,10 @@ def test_id():
def test_amount():
"""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 Relative =" in output
assert "UD ĞTest" in output
assert "Total Quantitative =" in output
......@@ -3,12 +3,9 @@ import pytest
from silkaj.tx import truncBase
@pytest.mark.parametrize('amount,base,expected', [
(0, 0, 0),
(10, 2, 0),
(100, 2, 100),
(306, 2, 300),
(3060, 3, 3000),
])
@pytest.mark.parametrize(
"amount,base,expected",
[(0, 0, 0), (10, 2, 0), (100, 2, 100), (306, 2, 300), (3060, 3, 3000)],
)
def test_truncBase(amount, base, expected):
assert truncBase(amount, base) == expected
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment