Skip to content
Snippets Groups Projects
Commit c50c2d76 authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA Committed by Moul
Browse files

[enh] Add a test on silkaj.tx.truncBase as an example to parametrized test

parent 8a000fea
No related branches found
No related tags found
No related merge requests found
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),
])
def test_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